Madrid suffered their first away defeat of the 2017-18 season at Montilivi and it looked set to be another uncomfortable outing when Borja Garcia gave the home side the lead after 16 minutes.
But Madrid turned the scoreline on its head with the help of careless tackles from Marc Muniesa and Pere Pons, allowing Sergio Ramos and Karim Benzema to convert a spot-kick apiece either side of the break.
Bale added a third in the 59th minute, with Benzema making absolutely sure of the win with a goal that puts Madrid above rivals Barcelona after two matches of the LaLiga campaign.
It was Madrid who made the early running, with Benzema finding the net after eight minutes only to be denied by the offside flag.
Isco could not sort his feet out in time to apply the finish to a squared Marco Asensio pass and Girona punished the visitors for their profligacy with the opening goal.
Anthony Lozano's shot was blocked in the box but the ball fell kindly for Garcia, who kept his cool to turn onto his right foot and fire high into Keylor Navas' net.
But the home side threw away their advantage six minutes from the break, Muniesa bringing down Asensio - who was running away from goal – inside the penalty area.
With Cristiano Ronaldo now gone, spot-kick duties fell to captain Ramos, whose delicate flick down the middle deceived goalkeeper Bono.
Madrid had another chance from the spot seven minutes into the second half - this time Benzema scoring from 12 yards out after Asensio was hacked down by Pons.
Almost an hour had passed by the time Madrid got their first goal from open play, with Bale slotting beyond Bono to stretch his LaLiga scoring run to a career-best six matches.
Benzema's second of the contest arrived 10 minutes from time to put the result beyond doubt, the French striker tucking home a Bale cross to round off the victory.
What it means: Lopetegui's Madrid pass test of character
Garcia's opener led to flashbacks of last season's 2-1 result between the teams at the same ground, although on that occasion it was Madrid who squandered the early lead. Girona looked bright after going ahead, but the penalties undid their hard work and the hosts tired badly in the latter stages, allowing Bale and Benzema to turn the screw.
Pat on the back: Asensio industry brings rewards
At a time when Madrid were desperately seeking a way back into the match, Asensio was putting himself into dangerous areas and making a nuisance of himself in the opposition box. Those efforts paid off as he twice drew bad tackles to win penalties that paved the way for Madrid to take all three points. Asensio's distribution was also a constant threat to the Girona defence. A terrific all-round performance.
Boot up the backside: Girona pay the penalty
When Real Madrid come to town, the last thing you want to do is give them needless opportunities to score. Muniesa and Pons did just that with their penalty-conceding challenges on Asensio. Muniesa’s tackle came with his opponent heading out of the danger zone, while Pons should have cleared before the Madrid attacker had the chance to turn in the box.
Key Opta stats:
- Gareth Bale scored his 150th goal in his professional club career.
- Sergio Ramos has now registered 56 goals in LaLiga, 25 more than any other defender in the 21st century (Andoni Iraola - 31).
- Marco Asensio is the first Madrid player to win two penalties in the same LaLiga game since Angel Di Maria against Athletic in April 2011.
- Girona have scored more goals against Real Madrid than any other side in LaLiga since the start of last season (six).
- Eusebio Sacristan, the Girona manager, has lost his seven league meetings with Real Madrid, scoring five goals while conceding 22.