Ronaldo reached the landmark in typically stylish fashion just before the break, making him only the second player after Lionel Messi to score 300 in Spain’s top flight and managing the feat in 48 fewer games than his long-standing rival, before completing the scoring late on.
Early evidence suggested Ronaldo and Madrid were in for a frustrating day at the Santiago Bernabeu, as Getafe put up a characteristically dogged performance.
But Gareth Bale broke the deadlock 24 minutes in, sending a fierce effort into the net from inside the penalty area.
On just his 286th LaLiga appearance, Ronaldo then got his 300th goal on the stroke of half-time, dazzling the Getafe defence with his quick feet before unleashing a fine finish, while a red card for Loic Remy early in the second period left the visitors with a mountain to climb.
Although a controversial Francisco Portillo penalty in the 65th minute gave the 10 men a route back into the contest, Ronaldo wrapped things up with his second in the 78th minute to move Zinedine Zidane’s men to within seven points of second-placed Atletico Madrid, who face Barcelona on Sunday.
Getafe’s performance during the early exchanges showed why they have the third best defence in LaLiga this season, as they sat deep and absorbed significant Madrid pressure.
And the breakthrough had more than a hint of fortune about it, as Isco rose to meet Karim Benzema’s looping cross and appeared to nudge it towards Bale with his arm, before the Wales star drilled low past Emiliano Martinez.
Madrid did not threaten again until the 40th minute, when Martinez managed to tip Dani Carvajal’s low drive wide of the right-hand post.
But Martinez was helpless on the stroke of half-time – Ronaldo collecting Benzema’s intricate pass and slamming home left-footed after skilfully evading a couple of challenges.
Things went from bad to worse for Getafe right at the start of the second half, as Remy caught Nacho Fernandez in the throat with a flailing arm and was unsurprisingly shown his second yellow card.
Madrid’s pressure became relentless thereafter and Benzema almost got in on the act, but Martinez kept his 16-yard effort at bay after Bale teed him up perfectly.
Getafe got themselves a lifeline just after the hour, though, as Portillo converted a spot-kick following the controversial decision to penalise Nacho when appearing to win the ball from Jorge Molina.
Ronaldo was prominent again twice in quick succession a few moments later, first seeing a header disallowed for fouling his marker, before forcing a remarkable save from Martinez.
But there was no stopping the Ballon d’Or holder soon afterwards as he met Marcelo’s cross with an unstoppable header before being replaced by Marco Asensio, with the Portugal star’s mission accomplished.