It depends how long you are planning to stay but Sitges which is about 20 k south of Barcelona has a very open gay scene , gay hotels , clubs etc but is a very mixed crowd overall ,Carnival is
Feb 20 - 25 or thereabouts and huge , like Mardi Gras , processions, fireworks , dancing in the streets , live bands ,total mayhem , the mayor of the town gives the citizens the freedom to be debauched and behave to excess for the entire week, best days are Sunday and Tues but the place doesnt sleep for practically the entire week. I`m going again this coming year , I love the whole atmosphere of the place.
If you book hotels early enough somewhere around 50- 60 Euro will get you a good room .