Ronaldo treble sinks Villarreal
The Portugal forward equalised twice in the first half and then fired the hosts in front in the 79th minute with his 22nd league goal of the season before setting up substitute Kaka for the fourth.
Coach Jose Mourinho's Real have 47 points from 18 games, with Barcelona on 49 after the champions swept aside Deportivo La Coruna 4-0 on Saturday.
"Cristiano leaves me speechless. There he is game after game, week after week. I don't know how to describe his performances," Mourinho told reporters as Real moved 11 points ahead of third-placed Villarreal.
Valencia are fourth on 34 points after Juan Mata, who had earlier missed a penalty, grabbed a late winner in a 1-0 victory at city rivals Levante.
Cani deservedly fired Villarreal in front after seven minutes at the Bernabeu but Ronaldo levelled two minutes later, tapping in Mesut Ozil's low cross.
Marco Ruben broke the offside trap to lob home keeper Iker Casillas in the 18th minute as Villarreal dominated but again Ronaldo hit back, heading in from close range following a free-kick just before the break.
Real started to step it up and it was Ronaldo who reacted quickest to a goalmouth scramble to score the third.
He then raced down the left in the 82nd minute and crossed for Kaka to net his first goal this season since returning from injury.
"In the first half Madrid were bad and Villarreal were fantastic. They are the best team to have played at the Bernabeu this season," Mourinho said.
"Instead of 2-2, 3-1 would have been a fairer result at halftime. But we made changes, we reacted and we had the courage to go out and win to maintain our record of winning every home game this season.
"In a championship where the top two drop so few points we had to take risks, we couldn't just sit back."
Espanyol crushed visiting Real Zaragoza 4-0 to keep up their push for a Champions League qualification place.
Pablo Osvaldo, Luis Gar#ia (penalty) and Alvaro Vazquez put the Barcelona-based side 3-0 up at half-time at Cornella-El Prat and Sergio Garcia completed the rout in the 87th minute to leave Espanyol fifth with 31 points.
Real Mallorca won 4-1 at home to Almeria, Osasuna drew 0-0 with Getafe and Sporting Gijon grabbed a last-gasp equaliser through Diego Castro to draw 1-1 at Racing Santander.
That result dragged Sporting off the foot of the table and up to 18th on goal difference ahead of Almeria and bottom club Zaragoza, easing the pressure on under-fire coach Manuel Preciado.