First, it is best to know the verb conjugation of these verbs and what they represent.
The verb "gostava" is conjugated in a verbal time called "pretérito imperfeito" (imperfect past). It represents something that happened in the past, but wasn't finished or gives a continuous idea, but it remains in the past. It's equivalent to the past continuous and past habit in English.
- Example: "I used to like traveling when I was younger" (Eu GOSTAVA de viajar quando era mais jovem"). This gives the ideia that in a certain moment in the past, I used to like traveling.
The verb "gostaria" is conjugated in the "futuro do pretérito" (future of the past), and represents a projection to the future based on something that happened in the past, or something hypothetical, or even to be polite. It is equivalent to the use of auxiliary verb "would" in English.
- Example: "I told you she would like you" ("Eu disse que ela GOSTARIA de você"); "Would you like to have some water?" ("GOSTARIA de tomar água?").
I hope this helped...