Well, there is one way to spot that it could not be the way around that you initially thought. Even though I cannot explain every grammatical aspect that, to my native gut feeling, seems to play a role here, as it's way back that I learned it in school ;)
Note the case used here:
It is the 3. case, Dativ, because you can ask: "Wem gefällt es? -> Ihm"
"Es gefällt ihm im Kindergarten sehr gut."
indicates that it cannot mean "It likes him in kindergarden a lot", even if "gefällt" worked in that direction (which would then be a grammatically wrong sentence, wrong case used).
If a word that does work in that direction was used, i.e. to say that it likes him there (the kindergarten has some monster lurking in a dark corner, which likes him? ;)), it would be e.g.:
Es mag ihn (it likes him)
This is using the 4. case, Akkusativ: You can ask: "Wen mag es? -> Ihn."
Do note the different ending letters: m vs. n.
See German cases
There in the column for Dativ, you will note word endings "dem, einem, unserem", and Akkusativ "den, einen, unseren".
Another example, and another clue:
See intransitive vs. transitive German verbs
- Es schmeckt ihm. It means "it tastes good to him", but not "it tastes him" :)
Ask: "Wem schmeckt es?" / (To) whom does it taste (good)? -> ihm / him.
- Side note: the rarely used "whom", the m at the end being a relic carried over from German to English - also used in the Dativ case.
- Es schmeckt ihn (it tastes him). Wen schmeckt es? -> Ihn.
In the first sentence, the "schmeckt" is an intransitive verb, which is formally defined as a verb that does not have an Akkusativ object. In this case, it has an object: ihm, which is Dativ (wem oder was schmeckt es?), i.e. not Akkusativ.
To me it feels like intransitive verbs are kind of a thing that happens, but there is not really an actor doing something actively. If something tastes good to you, it kinda just happens, but nobody is doing anything. (yeah, chemicals are doing something to receptors, but that idea existed much later than the verb & language construct ;))
In the second sentence, some monster from the dark corner, tastes him. This is a transitive verb: Ask "wen schmeckt es? -> Ihn.", where ihn is the Akkusativ object (remember the word ending) - so by definition, it is transitive. So, with my "duct tape memorizing aide" (called Eselsbrücke in German, lit. "donkey's bridge" :D): There now is someone (a monster) doing something active: tasting him.
I.e. like in English, "taste", in German "schmecken" is really two different verbs: a transitive one where someone is doing something actively, and an intransitive one, where something just happens. The logic between both is totally different, so I'd consider them two distinct verbs.
Side note: That this works in both English and German is a "coincidence". (well not really, given how closely both languages are related)
But it's rather uncommon to use "schmecken", in the sense of actively trying the taste. Some grandma might say "Lass mich die Torte schmecken" (let me taste the cake), or maybe it's a regional thing. But usually it is: "Lass mich die Torte probieren" (let me try the cake).
This is the same with "es gefällt ihm", other than gefällt (gefallen in basic form) is intransitive, there is no transitive double. I.e. it can only ever be used without an Akkusativ object (like ihn), i.e. you cannot say "es gefällt ihn". (you might hear that from a little child which has not yet figured things out so well ;))
So your initial interpretation of that sentence just does not work grammatically.
Now, okay, that seems a bit longwinded. But I hope it explains how to spot this kind of thing, and deduce by exclusion, what it can not mean. That's at least something :)
(This is, among other things, what Mark Twain complained about, in his (in)famous essay, IIRC. But it's no use, that's how it works :D)