Spain is country that, in general, lacks great musicians or philosophers. But what Spain certainly has are loads of painters.
Here is my top 3:
1. Diego Velazquez
2. Pablo Picasso
3. Joaquin Sorolla
Which are yours?
Velázquez - Picasso - Dalí
Not in a special order, all they 3 deserve the first place. The tecnique and the content (or soul) are inspiring.
With pleasure, almost all of them are in Madrid.
El Museo Sorolla is really beautiful and not busy at all. A beautiful little corner of the city.
As well, you can go to the famous Museo Reina Sofia de arte moderno. There you can find El Guernica de Picasso among many others great paintings.
After that you have an amazing private collection in el Museo Thyssen that it is more that worthy visiting.
In any case, if you fancy to travel a bit, in Malaga and Barcelona there are two good Picasso's museums.
At last, if you're interested in prehistorical art, the archaeological museum of Madrid is a hidden treasure. The celtiberan art has left us many great works.
I hope this has helped you ;)