I have been all over Spain and have not had a problem with the language. The people are so friendly and helpful. Even if you have to resort to gesturing, you will be able to communicate. And, I promise, if you are in trouble or in danger, they will go out of their way to find someone who speaks English in an emergency.
With that said, buy a phrase book and do a little studying before you go. It will be greatly appreciated (in any country) if you know a few words. (Good morning, thank you, excuse me, etc.) I also like to know some 'food' words so I don't miss out on anything in a restaurant!!! Spanish is not too difficult - alot of words either look or sound like their english counterparts.
I am going to Thailand next month, and I am having a problem grasping even the most basic words, as they use a different alphabet, and when translated into our alphabet there can be many different spellings of the same word. Practice makes perfect!!!
You will have a GREAT time in Spain!