„Gustar” works backwards from „to like” — the thing is pleasing to you, not the other way round.
I like something / doing something
A1me gusta + rzecz. l.poj. / infinitivo
„Me gusta” for one thing or an action: „me gusta el café”, „me gusta viajar”. Literally „…is pleasing to me”. With an action it's always „me gusta” + infinitive.
Examples
Me gusta el café.
/me ˈɣus.ta el kaˈfe/
PLLubię kawę.ENI like coffee.
Me gusta viajar.
/me ˈɣus.ta βjaˈxaɾ/
PLLubię podróżować.ENI like travelling.
Common mistake
Me gusta gatos.→Me gustan los gatos.
With a plural, the verb agrees with the thing: „me gustan los gatos”. Keep „me gusta” for singular and actions.