Kaka scored on his season debut at the Bernabeu as Madrid continue to collect points in La Liga...
Villarreal twice went ahead, first through Cani and then through Marco Ruben, but on both occasions Ronaldo equalised, and after putting los Blancos 3-2 up with a clinical finish on the turn created the chance for Kaka to score on his comeback match at the Bernabeu to round up what was a thoroughly entertaining game of football.
The tone of the clash was set right from the start as Santi Cazorla had the game's first shot towards goal after just two minutes.
The visitors continued to dominate the opening exchanges and went ahead in the seventh minute when Cani found the target from close range. In a typical Villarreal move, Cazorla picked out Rossi on the edge of the box who then released Cani and the former Zaragoza player slotted the ball home with a neat finish.
The Yellow Submarine's lead was ephemeral, though, as Ronaldo successfully converted Madrid's first real attack of the match. Karim Benzema released Mesut Oezil inside the Villarreal box on the right and the Germany international's cross was tapped in by Ronaldo from close range.
Los Blancos could have added a second almost immediately had Lassana Diarra's shot from distance been more accurate. Seconds later Marco Ruben's volley for the visitors went wide.
The 24-year-old made amends on 18 minutes when he found his way past Iker Casillas and put Villarreal 2-1 in front. Released by Bruno Soriano with an exquisite through-ball, Ruben drifted to the right side of Madrid's 18-yard box and lobbed his shot over Casillas into the net.
Thereafter Villarreal and Madrid each had a goal disallowed, Cazorla and Ronaldo's efforts being deemed offside by the officials.
Cazorla crafted a great chance for himself on 38 minutes when receiving the ball on the flank he skipped past three Madrid players and marched on to the edge of the D-box but was eventually dispossessed by centre-back Ricardo Carvalho.
Madrid took over proceedings from thereon and equalised in injury time. Left unmarked during a Xabi Alonso free-kick, Ronaldo headed in the sharply chiselled delivery from close range to make it 2-2 at the break.
That goal seemed to reinvigorate Madrid as they came out at full throttle at Villarreal. Ronaldo, Angel Di Maria and Benzema all asked questions of the visitors' defence in the opening minutes but it was the Portuguese ace who came the closest four minutes after the hour-mark when finding himself in an one-on-one situation with Villarreal goalkeeper Diego Lopez, he took too much time on the ball and was forced to pass it back to Sergio Ramos, whose attempt was off-target.
Ronaldo atoned for his mistake 11 minutes from time when after Benzema's shot was blocked by Lopez and fell to him, he smashed it into the net while shooting on the turn.
The former Manchester United star then turned the provider as his brilliant cross from the left was shot home by Kaka in what was his first game at the Bernabeu since returning from injury.
The 4-2 victory means that Madrid remain a couple of points behind arch-rivals Barcelona in second place as the race to win the championship continues to excite the fans.