This question is not actually specific to gustar, but given that it's such a widely discussed verb for Spanish language learners coming from English, I thought it may be the easiest example.
I understand, in broad terms, the difference between direct and indirect objects - at least in English. Verbs which can/must have direct objects use them to specify what is actually being done (I wrote a letter, I eat some food, I hit her), while the indirect objects will either follow a preposition or can be reworded to follow one (I gave her a book/I gave a book to her, I hit her with a stick, etc.) and are always optional. Or, at least, I can't think of a single English example of a verb which is nonsense without an indirect object.
But based on the fact that we say "le gusta" and not "lo/la gusta" it seems to me that gustar takes an indirect, rather than direct object. This mirrors English in the way that I could add, for example, "a Maria" to specify who the "le" is referring to. "Maria" would follow a preposition.
Which brings me to my question. Is "El perro gusta" on its own a sentence that makes any kind of sense at all? Because I strongly believe the answer is no, but I find that confusing. I've been cautioned against translating "gustar" in my head as "is pleasing" because that isn't what it means - despite mirroring English sentence structure. I've been cautioned against translating it in my head as "is liked by" because it isn't passive. I'm willing to accept that there isn't a perfect literal translation, I'm not overly hung up on this verb in particular. It's more that the necessity of the indirect object here, and complete lack of direct object, has completely shaken my confidence in choosing the correct object pronouns for sentences I haven't already heard.
Le ayudo or lo/la ayudo?
Le pego or lo/la pego?
Le llamo or lo/la llamo?
For ayudar I seem to be able to find examples of both. For pegar the correct choice seems to be "le" but I can't work out why. For llamar I seem to be able to similarly find examples of both, and while my hunch is that it depends on whether I'm telling you how I address this other person (I call him George) or calling to them (I call him every night) I can't find enough evidence to support or dismiss this hypothesis.
Please help. How do I identify (in)direct objects when I see them in Spanish?