If you have not experienced this, it may seem a little specific, but it happens all the time. There is a strain of practical jokery which involves telling the "victim" something completely reasonable, mundane and within the realm of possibility, then cackling with self-satisfaction when they believe the lie. It is the laziest and saddest of "jokes," because the joke is ultimately on the prankster. For example, it is very funny to convince the nation they are being attacked by Martians. It is not funny say "the mail is here! No, just kidding." Pranks such as calling the police to convince them you have committed a murder fall in a gray area. Garfield's trick on Odie largely falls into the first category, wherein it is perfectly reasonable that if Odie is far enough from the door, or there is a prowler outside, the dog might not have heard the approaching human.
Garfield seems to believe that the trick proves that Odie is stupid. Perhaps it does, but not because the dog is gullible enough to act on the cat's bad information despite lack of evidence. If Odie does anything stupid in this strip, it is believing Garfield, who habitually acts deceitfully toward Odie. All Garfield has demonstrated is that he is not trustworthy, though he may have descended so far into his own pathology that it is amusing that people assume they are not being lied to about subjects of no importance. This is funny only in the way that it is funny that people breathe air to survive and wear coats when it is cold.
There is a second, less malicious level to the joke, though. It is a Self-Fulfilling Prophecy gag, in which the victim is given a cue, unconsciously enacts a predictable behavior pattern, and finds the letter of the promise fulfilled by their own action, if not the spirit. That is vague, so for example: my dad's favorite of these jokes is to ask a child "what's in your pockets?" Child instinctually thrusts hands into pockets, gropes about only to find nothing. Punchline: "Your hands!" This is more a gag about the intricacies of literal language and programmed behavior than a joke at someone's expense. See also under The Monster at the End of this Book. It is interesting to consider why the prank works, beyond the dog's gullibility. Once Odie has reached the door, "someone" is indeed at the door. Most of us still might not grasp the punchline without explanation, because we do not typically think of our personal Self as "Someone." Therefore the joke is about identity and individual consciousness, if only in the broadest possible way. Related, Garfield is preying on Odie's curiosity and protective instinct, and while barking at everyone who comes to the door is an obnoxious trait of dogs, it is one of the basic reasons they were domesticated in the first place.
This does not stop it from being a dick thing to to, of course. Though Garfield forces Odie to demonstrate some vagaries of language, it is one step removed from correcting someone's grammar in the middle of conversation. Garfield intends the common irony of applying Einstein's name to someone who has just demonstrated foolishness, but given that Einstein understood God "who reveals himself in the lawful harmony of the world, not in a god who concerns himself with the fate and the doings of mankind," he would likely approve of the elegant cause/effect demonstration enacted by the idiot dog and the jerk-ass cat.