My boyfriend and I want to go visit my sister in the UK, I am English citizen with residence in Spain and he is from Ecuador and with residence in Spain too. Will he need an visa even though he is traveliing with me and staying with my family? Will a letter of invitation do? I did not want to get an visa as it is double the price of the flight and won't be ready in time.
Since you are (apparently) not married, I'm afraid that he is in the same situation as if he was a random Ecuadorian national with his residence in Spain, which means he will need a visa (per the UK Border Agency's website). As far as the law is concerned, neither you nor your relatives are his “family” so it really doesn't matter that you are traveling together or visiting them. I don't think a letter of invitation would be of any help anywhere either, it's typically something you might need to get a visa in the first place, not something that can replace one.
If you were married (or, possibly, in some form of registered partnership), he would have some rights (see Non-EU spouse of an EU citizen - is visiting EU without needing a visa possible? and the official EU website) but you would still need to be careful, travel together and make sure his residence permit explicitly mentions the fact he is a member of the family of an EU national as some countries have been known to make trouble for family members anyway.