Real bounced back from their Copa del Rey exit at the hands of their 'el clasico' rivals by maintaining their league momentum despite going behind against bottom club Zaragoza at the Bernabeu.
Jose Mourinho's side conceded after 11 minutes when Angel Lafita found the net, only for Kaka to equalise just after the half-hour mark.
Cristiano Ronaldo put the hosts ahead at the start of the second period before Mesut Ozil sealed the turnaround after 56 minutes.
Barca were in action afterwards and put in an under-par performance against relegation-threatened Villarreal.
Lionel Messi went close with a deft chip in a first half that saw Villarreal finish stronger, but as Barca pushed for the goal after the interval they found no way past Diego Lopez.
Cesc Fabregas went closest with a deflected effort that Lopez turned against the bar, while Messi missed a one on one with five minutes remaining.
Espanyol went level on points with fourth-placed Levante after a scrappy 1-0 win over Real Mallorca.
In a first half devoid of invention it was an error that gifted Espanyol the lead as Dudu Aouate collided with one of his own defenders and dropped the ball invitingly at Vladimir Weiss' feet for the Slovakian to slot home.
Aouate's day got even worse two minutes after the break as he was harshly sent off for bringing down Rui Fonte just outside the area.
Fernando Llorente scored a hat-trick as Athletic Bilbao came from behind to beat Rayo Vallecano 3-2.
Michu put Rayo ahead after 11 minutes only for Llorente to equalise five minutes later by heading home Inigo Perez's free-kick.
The Spain international then put the visitors 2-1 in front with a wonderful turn and finish, but Alejandro Arribas took advantage of Gorka Iraizoz's error to make it 2-2 four minutes later.
Rayo then passed up a host of glorious opportunities either side of the break and were punished as Llorente powered home the winner midway through the second half.