Ronaldo opened the scoring in the 11th minute with a deadly first-time finish but former Middlesbrough forward Cristhian Stuani headed home from a corner to draw the Catalans level in the 29th minute.
The Portuguese restored his side’s lead at the start of the second half by racing on to a through ball from Karim Benzema and hammering it in off the crossbar. He then laid on a pass for Lucas Vazquez to score Real’s third.
Ronaldo gobbled up a rebounded shot from Benzema to complete his hat-trick in the 64th and make it 4-1, while substitute Gareth Bale added a fifth in the 86th after Stuani had struck again down the other end.
Girona’s Juanpe then made it 5-3, only for Ronaldo to roar back in injury time and score his fourth goal of the game, his 17th in his last eight appearances in all competitions.
Ronaldo has now netted 22 times in the league this season, trailing Barcelona’s Lionel Messi by just three goals.
“Cristiano is very important to us, he transmits an incredible amount of energy for the team,” Real Madrid coach Zinedine Zidane told reporters.
“Cristiano is three goals from Messi and I hope he can become the top scorer because it’s very important to him. When Cristiano plays well the team plays well.
“Cristiano’s ambition is tremendous. But I also want to highlight the work of his team mates, who help him a lot. We scored some spectacular goals today which was down to the whole team.”
Ronaldo’s goal rush helped him to leapfrog Luis Suarez into second place on the Liga’s top scorer’s list, with the Barca forward missing his side’s 2-0 win over Athletic Bilbao on Sunday due to suspension.
Real are third in the Liga standings on 60 points, 15 behind runaway leaders Barcelona and four adrift of second-placed Atletico, who were beaten 2-1 at Villarreal on Sunday.