This depends heavily on what you’ll be doing. If you’re traveling on a tight backpacker-style budget, $40-$60 per day is realistic and will get you lodging in an inexpensive hotel or hostel along with a meal or two out. Bringing in groceries from a local market or store and cooking your own meals can cut down significantly on costs. You can also take part in a lot of free tours and self-guided meandering, which is easy to do in Barcelona.
If you’re able to afford a bit more, $100 a day can get you nice accommodations, more meals out, and souvenirs without being too extravagant. This also allows room for more paid attractions.