I don't drive in Europe so can only suggest a couple of towns I was able to reach by public transportation (in the summertime) that I thought were very pretty: Puigcerda (poo cher DAH) and La Seu d'Urgell. There are also some smaller places stretched out along the highway running both north and south from Puigcerda: Llivia (surrounded by France) on the N-154, and Bellver de Cerdanya and Martinet on the N-260.
I have no idea whether either area would fit well into a 5-day loop from Barcelona.
Besalu, with its fortified bridge and preserved medieval core, is definitely possible, but it's readily accessible by bus from Girona and even from Barcelona. If I had a car I would prioritize places that are difficult to each without one.