The majority of the gay establishments are centered around the neighborhood Eixample (nicknamed Gayxample for obvious reasons), near the Urgell and Universitat metro stations between Arago street and Gran Via street. If you go there, you can easily find many gay bars and clubs and even saunas if that's your thing.
My favorite is probably El Cangrejo where the music is popping and the guys are hot. There are also Arena clubs that are big and cavernous but they trend younger and start later. There are some lounge bars too if you like laid back.
Keep in mind that since this is Spain, the party starts much later than other places. Most bars and clubs don't start filling up until well after 1 am or maybe 2 am, and they can go till morning, after which everyone goes for churros for breakfast.
You can check out http://www.travelgayeurope.com/destination/gay-spain/gay-barcelona/
No matter what, I'm sure you'll have fun in a gay friendly city like Barcelona.