"I like it" in English puts the person doing the liking in the subject spot. Gustar flips that around: the thing being liked is the subject, and the person is just along for the ride as an indirect object. That's why gustar almost always shows up as gusta or gustan, agreeing with whatever's being liked instead of with the person.

The short version

Gusta agrees with one thing being liked, or an infinitive. Gustan agrees with more than one -- the verb never conjugates for the person doing the liking.

Gusta

One thing (or an infinitive) is doing the pleasing

me gustate gustale gustanos gusta
Me gusta el café.
I like coffee.
El café is singular — gusta agrees with it, not with "me"
Le gusta bailar.
She likes to dance.
An infinitive always takes the singular gusta
¿Te gusta esta canción?
Do you like this song?
One song, singular gusta

Gustan

More than one thing is doing the pleasing

me gustante gustanle gustannos gustan
Me gustan los perros.
I like dogs.
Los perros is plural — gustan agrees with it
Nos gustan las playas de aquí.
We like the beaches here.
Plural subject, plural verb
¿Te gustan los mismos libros que a mí?
Do you like the same books as me?
Plural books, plural gustan

A ella le gusta el libro, pero a mí me gustan las películas basadas en él.

She likes the book, but I like the movies based on it.

Gustar never conjugates for the person doing the liking -- me/te/le/nos/les just marks who's affected. The verb itself always agrees with the thing being liked: gusta for one, gustan for several.

Ready to test yourself?

Take the quiz and see if you can match gusta and gustan to what's being liked.