I wouldn’t say sim is rare in Portugal, but then how rare is rare? That said, in your example, simply gostei would be the most common answer in my experience, followed by sim, gostei. This will often be the case in questions of the type, do/did someone do X?
— Falaste com o João hoje? [Did you speak to João today?]
― Falei.
— A Ana está em casa? [Is Ana at home?]
— Está.
Or in já- and ainda-questions:
― Ele já chegou? [Has he arrived yet?]
― Já. [Already = yes, he has.]
― Ele ainda cá está? [Is he still here?]
― Ainda. [Still = yes, he is.]
A sim will be more likely if you go on to elaborate, especially with long verbs:
― Regressas já no domingo? [Are you coming back Sunday already?]
― Sim, trabalho logo na segunda-feira
A sim will also be common when answering questions of the type would you like […] in formal situations. Imagine a restaurant:
― Desejam ver a carta dos vinhos?
― Sim, se faz favor.
Even in informal situations;
― Queres que te compre o jornal? [Would you like me to buy the newspaper for you?]
— Sim, se fazes favor.
[Also:] — Quero. Obrigado.
Also when you combine several questions in one:
— Regas as plantas e dás comida aos peixes?
— Sim, não te preocupes.
Rego e dou wouldn’t work out very well. Other situations where a reply including sim would be very common:
— Ele não veio?! Mas ele disse que vinha, não disse?
― Sim, disse.
[But also simply:] Disse.
— Pedi para o convidares, mas tu não o convidaste.
― Convidei, sim!
[But also:] ― Convidei, convidei!
— Naqueles tempos a vida era muito dura.
— Ah, sim! A juventude de hoje nem faz ideia.
— Amanhã temos pouco tempo. É melhor fazer a feijoada já hoje.
— Sim, até porque a feijoada fica melhor de um dia para o outro.
[For the umpteenth time:] — Mas vens mesmo ao jantar amanhã?
— Sim, já disse que sim.
[Or:] — Venho, já disse que venho.