We went in May a few years ago and and it was pleasant during the day and light jacket/sweater in the evening weather. Looking at some charts, it could indeed get kind of cold in December/January. Average high 60F(14C), average low 41F(5C).
Also, less crowded sometimes means less happening. The architecture will still be there (a favourite of 9 and 12 yr old tourists ) but maybe less buskers, festivals, tours, etc.
Barcelona is ok in winter the times I’ve been there. Not cold, a bit chilly, but the sun is warm. But if you go a bit further south, the weather is actually quite nice also in winter. In Andalucia you’ll have sun enough that you can sunbathe most days. And you can ski in the Sierra Nevada, so you have both things.
I went to Grenada for Christmas about 8 years ago (and from there to Morocco for New Year) and it was pretty lovely. No hordes of tourists at the Alhambra, and pleasantly cool, sunny weather. It did seem a bit deserted, but that was for Christmas itself rather than winter per se; an expat in some Irish bar told me that the local population made an exodus to ther coast for Christmas, but presumably a metropolis like Barcelona wouldn’t be like this.