The 33-year-old opened the scoring with an 11th-minute strike, converting a Toni Kroos ball from 12 yards out with a cool one-time finish.
Cristhian Stuani pulled the visitors level before Ronaldo restored Madrid's advantage in the 47th minute, firing home after being slipped in by Karim Benzema.
50 - Cristiano Ronaldo has scored his 50th hat-trick in all competitions (club + country). Beast. pic.twitter.com/l7xlOzEFfe— OptaJose (@OptaJose) March 18, 2018
Lucas Vazquez extended Madrid's lead in the 59th minute, and Ronaldo made it 4-1 just five minutes later with his milestone strike. While Yassine Bounou denied a Benzema effort, the Portuguese was there to bury the rebound from point-blank range.
The goals kept on pouring in from there, with Stuani completing his brace and Juanpe also finding the net for Girona, while Gareth Bale got on the scoresheet for Madrid.
But it was Ronaldo who put the icing on the cake, netting in second-half stoppage time to cap the scoring.
It was Ronaldo's 34th hat-trick in La Liga, while he also has seven in the Champions League, four in World Cup qualifying, two in the Copa del Rey, and one apiece in the Premier League, the Club World Cup and European Championship qualifying.
Ronaldo now has nine four-goal performances in his career, including two five-goal outings.
The five-time Ballon d'Or winner has 34 goals in all competitions this season, with 22 coming in La Liga.
Madrid sit third in La Liga, 15 points behind rivals Barcelona. They resume league play against Las Palmas after the international break before traveling to face Juventus three days later in the first leg of a Champions League quarter-final tie.