In reply to HikeandClimb:
Hi,
I have lived in Catalonia for 15 years, speak fluent Spanish and almost-fluent Catalan. FWIW I grew up bilingual in Wales and still speak Welsh every day with my daughter (who speaks four languages fluently at the age of 9!)
From your original message, I would recommend you learn Spanish first. While most Catalans (especially in the rural areas where you are planning on staying) are more comfortable speaking Catalan than Spanish; all of them speak fluent Spanish, to a higher standard than you will likely ever reach. Very few will feel slighted by a foreigner speaking to them in Spanish - particularly if you drop a phrase or two of Catalan in at the beginning of any conversation.
Spanish is an infinitly more useful language than Catalan, simply because it is spoken by two orders of magnitude (or so) more people. Learning a new language as an adult is not trivial and takes many hours of study and/or immersion.
My advice would be different if you were planning on living in rural Catalonia full time 'forever', or marrying into a Catalan family. I have met several 'foreigners' who have done this and have defaulted to learning Catalan first, as it reflects their daily lives.
My other comment is that if you speak Spanish and end up spending a lot of time hanging around Catalans, you will start to understand Catalan pretty quickly; the languages are very similar and once you get used to the accent and intonation, you pick it up.
That all said, if you chose to focus on Catalan you would get plenty of brownie points from the locals!