I am wondering if any of the games has Barcelona as a playable location. Perhaps one from the Ezio series?
Technically yes, but mostly no.
There is an ios boardgame called AC: Recollection, which offers Barcelona as a mission location, but that's a far cry from a playable location.
Discovery offers a very short linear stint in Barcelona, so that's the best you can get.
Project Legacy was a facebook game, which may have contained Barcelona, but again a far cry from a playable location, on top of that this game was shut down three years ago.
From the main series no game even enters Spain.
There's actually some story regarding Barcelona in the Assassin's Creed Universe:
After having been informed on the Spanish Inquisition imprisoning Assassins, Ezio Auditore decided to travel to Barcelona to save several Assassins that were being held prisoner by the Spanish Inquisition, having been labeled "heretics". Ezio visited the Thieves Guild, though he found it had been abandoned before being ambushed by several guards. He managed to escape through the sewers and met a fellow Assassin, Raphael Sánchez, who directed him to Gaspar Martínez. Ezio confronted Martínez, who claimed to have no knowledge of the Assassins, but also stated that the heretics were to be executed one by one. He then told Ezio that the first one was to be burned that same day. Ezio assassinated Martínez and quickly set off to rescue the Assassin. He arrived just in time to kill the guards overseeing the execution. He then met up with Raphael again, after which they traveled to Zaragoza.
During the Liberation of Rome, Ezio sent a team of Apprentices to Barcelona to find out whether or not Queen Isabella served the Templars. The Apprentices located the room of Luis de Santángel and discovered his journal. The journal revealed that he had been trying to poison the queen before he died, but the Assassins were not sure whether it was merely out of revenge, or because of her affiliation with the Templars. They decided to investigate her and started following the queen, noticing she was being influenced by many religious figures. They also intercepted several Borgia letters, which revealed her as a servant to the Borgia. After that, they sought out one of Santángel's accomplices, who agreed to poison the queen if the Assassins provided the poison.
Source: Assassin's Creed Wiki
In terms of actual games no major-release of Assassin's Creed includes Barcelona as a playable location. There are 2 non major-releases that actually have it.
- Assassin's Creed: Discovery (Nintendo DS and Iphone - Wiki)
- Assassin's Creed: Project Legacy (Browser game - Wiki)
I wouldn't consider any of the Project Legacy locations, playable locations but they are there so.
You can play in Barcelona in those AC games :
AC2 : Discovery ; side-scroller game
AC : Project Legacy ; facebook game
(see the references at the bottom of the page)