To knock on someone's door you need to walk onto the property and go up to the persons house to be able to knock on the door.
So since you had to walk up to the door to knock on the door and you walked on private property to do so then yes it is really trespassing.
However most people do know that people will walk up to their door if there's no fence and knock on the door or ring the doorbell.
So unless you go up to a bad person's house or a really grumpy person's house and knock then they are unlikely to want you trespassed from the property.
However if you keep coming up to the door and knocking and annoying them then they might tell you to not do that anymore or they will contact the police.
The police will then just warn you to stay off the property and if not you can be arrested.
But although technically walking up to someone's door and knocking can be trespassing it usually is not a problem.