Almost every neighborhood has a mercat, or indoor food market. The most famous is La Boquería, but I would go to one of the less famous mercats for lunch. There are restaurants in the mercats (often just a few barstools at a counter) that open up for lunch around 1:30 p.m. and the food is amazing and fresh. If during the week, get a menú del día (2 course meal with drink and dessert) or if you want something lighter, a plato combinado (typically something like fries, vegetable, and a meat).
Here's a list with a link to all the mercats:
https://ajuntament.barcelona.cat/mercats/es/canal/mercats-alimentaris