Real Madrid's hopes of beating Barca to domestic glory ended last weekend but that did not stop Carlo Ancelotti's men from starting in style on Saturday, with Marcelo's inch-perfect cross met by the head of Ronaldo 13 minutes in to make it 1-0.
However, the visitors then scored twice in a matter of minutes to take the lead, before Ronaldo scored a free-kick to put his side back on level terms and equal his previous best total of 60 goals in a season dating back to the 2011-12 campaign.
But that personal record was broken two minutes later when the 30-year-old converted a penalty to put the Blancos 3-2 in front at the Santiago Bernabeu - his 313th goal in his 300th game for the club.
Ronaldo's hat-trick means he now has 48 league goals this season, which makes him the top goalscorer in the major European leagues in 2014-15 and a three-time Pichichi winner. He is also just 10 efforts behind Raul as he closes in on becoming Madrid's greatest goalscorer of all time.
The match ultimately finished 7-3 to the Blancos, with Ronaldo replaced midway through the second half for Martin Odegaard, with the 16-year-old Norwegian becoming the youngest-ever player to play for the capital club in La Liga in the process.