I've been to Madrid and Barcelona and find Barcelona to be more civilised, vibrant, stimulating and stylish.
Cuisine in Barcelona is much much better than in Madrid. My mouth waters when I think of the meals I have enjoyed at Principal, Botafumeiro, Senor Parellada, Tenorio, Ca l'Isidre, Cal Pep, Tragaluz, 7 Portes and Xampanyet....mmmmmmmm! The restaurant scene in Barcelona is booming with talent and creativity.
Prices for dinner for 2 without wine at the following:
Principal - about 65 euro
Botafumeiro - about 130 euro*
Senor Parellada - about 35 euro
Tenorio - about 30 euro
Ca l'Isidre - about 130 euro
Cal Pep - about 30 euro
Tragaluz - about 38 euro
7 Portes - about 60 euro
Xampanyet - tapas for about 1.25-3.50 euros
*Note that Botafumeiro specializes in Galician style cooking and is perhaps one the the top seafood restaurants in Barcelona if not all of Spain.
Principal and Tragaluz are part of a crop of modernist design restaurants akin to Terrance Conran's restaurants in London. The dining rooms showcase Barcelona's design talent and the kitchens showcase gastronomic creativity. Catalan cooking has its traditions and these restaurants highlight how it has also been influenced by Mediterranean and Pacific cooking.
Senor Parellada, Tenorio, Ca l'Isidre and 7 Portes will offer you traditional Catalan cooking. Other notables are Los Caracoles and Bilbao. I ate at Los Caracoles when I first visited Barcelona in 1975, and I'm so happy that it is still around!
If you love seafood, than Barcelona will fit the bill. The quality and variety of seafood is astounding. Make sure you eat at Cal Pep in the Barri Gotic for incredible scallops, prawns, cod, clams, sardines, calamares, etc. There are also numerous seafood restaurants in Barceloneta/Frente Maritimo.
For tapas, you won't be dissapointed at Xampanyet, Schilling, Opaqo, Amaya, Bar Pinotxo, Romesco, and Carballeira.
For really cheap eats, try Pou Dolc, La Garduna (near the Mercat de la Boqueria) and L'Estevet.
Keep in mind that in Barcelona, lunch is usually eaten around 2:00pm and dinner never really begins until 9:30pm. So for your gastronomic tour plan on l'esmorzar/desayuno (breakfast) at 9am, an aperetivo at 1pm, almuerzo (lunch) at 2pm, merienda at 6pm, tapas with beer, wine or sherry at 7pm, and sopar (dinner) at 10pm. You'll definitely get your fill of eating and drinking!