As in most other big cities in Europe - Barcelona is a place where pick-pocketing exists in certain areas. But if taking a few precautions, your odd for passing your vacation without any kind of problems rise considerately.
In general the places in Barcelona where many people agglomerate are the ones where to pay special attention. Therefore you should beware of some of the most visited and popular places in Barcelona such as las Ramblas, Sagrada Familia.
Another danger in Barcelona is trick thievery. somebody comes up to you and as you a question to distract you while somebody else tries to go in your pockets.
You can even be unlucky to get yellow foam sprayed on your clothes as part of a trick thievery. Several people collaborate in these kind of intents to distract your attention and one plays the role of "helping" you.