Madrid had gone in front but Barca stormed back to dominate.
Valencia, in third, lost 2-1 at Real Betis, whilst fourth met fifth as Levante beat Sevilla 1-0.
Villarreal drew 1-1 with Real Sociedad and Athletic Bilbao drew 1-1 with Racing Santander.
In England, Manchester United beat Wolves 4-1 to recover from their shock Champions League exit. Arsenal moved up into fourth after beating Everton 1-0 thanks to a Robin van Persie volley whilst Tottenham were stunned as Stoke beat them 2-1 at the Britannia Stadium.
Newcastle lost 4-2 at Norwich and Liverpool beat QPR 1-0.
Udinese beat Chievo 2-1 to move to the top of Serie A ahead of Juventus, whilst AC Milan were held 2-2 at Bologna. Inter beat Fiorentina 2-0 to get back to winning ways whilst Napoli were held 1-1 at Novara. Lazio beat Lecce 3-2 whilst Palermo fell to a 1-0 defeat at home to Cesena.
In Germany, Borussia Dortmund had been held 1-1 at home to Kaiserslautern, meaning Bayern went top with a 2-1 win at Stuttgart. Borussia Moenchengladbach fell to a surprise 1-0 defeat at Augsburg, whilst Cologne beat Freiburg 4-0. Schalke beat Hertha Berlin 2-1 and Werder Bremen beat Wolfsburg 4-1, whilst Bayer Leverkusen were held 0-0 at Hannover.
In France Montpellier lost 1-0 at Valenciennes, a major shock, whilst PSG beat Sochaux 1-0 to move level on points at the top of the league. Lille beat Dijon 2-0 whilst Lyon won 1-0 at Lorient. Marseille and Bordeaux drew 0-0 and Toulouse beat Evian 2-1.
At the Club World Cup in Japan, home side Kashiwa Reysol beat Auckland City 2-0 in the opening game, before defeating Mexican side and CONCACAF Champions League winners Monterrey on penalties.
They now play Santos in the semi-finals, whilst Esperance of Tunisia lost 2-1after extra time to Al Sadd of Qatar, who now face Barcelona in their semi final.