Hi Leah,
There's public transportation to most of the 947 cities and tows in Catalonia, however, outside the metro areas it doesn't work as a commuter service (many and very often). If you need to travel from A to B you're bound to find a bus/train but maybe it's only available twice a day so it doesn't allow you to do a day trip. So when you say you intend to travel "the Pyrenees and la Costa Brava", since I'm assuming you don't mean to travel to 'a' city/town but to visit several, I'd strongly advice to hire a car.
Since you're coming over with a toddler, perhaps these can be of interest to you: http://www.kidsinbarcelona.com and for renting say a car seat or a prom or any other stuff you might need: http://www.easytravelkids.com and http://www.babytravelling.com Regarding special food for babies, you will find plenty at any of the many pharmacies and also in supermarkets so it's very easy to find one nearby. The brands you'll find are pretty much the same you'll find elsewhere (Nestle, etc). Note though that products in pharmacies tend to be more specialized hence more expensive.
Also, for further info on different things to see/visit around Catalonia -not only the areas you mentioned- you should have a look at www.catalunya.com and www.infocatalonia.eu
Lastly, although I guess you might have already have this, these are sites related to transportation you might want to look at:
www.rodalies.tk -the official website of the Catalan government for regional train travel within Catalonia. Note the link is a shortlink which will take you to the official URL -which is a very long one! :)
www.renfe.es -the Spanish train operator. Good for long distance travel -to/from Catalonia- as well as info on high speed train travel within the region (ie. Barcelona-Girona)
www.alsa.es , www.sarfa.com , www.teisa-bus.com and www.solerisauret.com are four of the most used bus companies, each one is specialized in different areas of Catalonia.