"He likes coffee."
Translation:A él le gusta el café.
Literally it is the coffee is pleasing to him. Coffee is the subject, and it pleases him. Gustar takes indirect objects. A él is a prepositional phrase that clarifies le.
I put "El le gusta el cafe" and was pleased that I got that much right! Why is there an A in front. I am very confused with 'a'. It seems to be thrown in at random!
It's because the sentence is backwards, making él the direct object rather than the subject.
The subject of the sentence is "coffee", and since Spanish requires an article in front of subject nouns, we need an "el" before "café."
Because the verb is gustar, which translates as "to like" but is closer to "to be pleased by", the object of the sentence comes before the verb. Here that object is "le", which can mean "him", "her" or "you" (singular formal).
So to clear up any ambiguity, you can choose to specify who is being pleased by the coffee. In Spanish, this requires you to attach the "personal a" to the direct object: A él, A ella or A Usted.
Why is it not "a el le gusto el cafe"? If gusto reflects the object, and cafe is masculine - shouldn't it be gusto with an "o"?
No because -o as an ending in verbs shows the first person singular (hablo - I speak, como - I eat, vivo - I live). What you're referring to is adjectives (el café frío (the cold coffee) would totally be correct). But with verbs it's different. The objekt in the sentence "The coffee is pleasing me" (which is easier to translate since it get's closer to the literal meaning" is "el café". So the verb has to be in the third person singular -> él/ella/usted gusta! I hope I could help. :)