Girona were out to grab their first win of the campaign, but were nearly pushed back by Real who looked to go in front but Karim Benzema saw his effort ruled out for offside on eight minutes.
Los Blancos missed another golden opportunity to go in front when Isco failed to steer home a sitter following a low cross from Marco Asensio on 14 minutes.
The hosts made them pay for that as Borja Garcia put them ahead after collecting a ball before cutting inside to blast in the top corner on 16 minutes.
Minutes after, Chilean Juanpe threatened to grab a second but the exploits in goal of Keylor Navas came to Real’s rescue.
On 26 minutes, Girona tried to crack a second through Portu but good defending from Daniel Carvajal prevented him to take a shot at goal.
Real were awarded a chance to draw level after being awarded a penalty following a foul on Marco Asensio inside the box.
Captain Sergio Ramos made no mistake from 12-yards with a 'Panenka' to put the tie on level terms on 39 minutes.
The Whites didn’t let up early in the second half, and went ahead as soon as possible albeit from the spot once again.
A foul inside the box forced the match official to point the spot for the second time in the game, and Karim Benzema stood forward to put his side in front on 52 minutes.
Seven minutes later, Gareth Bale added a third, firing home a stunning left-footed finish following a pass from Isco.
Real made a change to keep their balance on the clash, with Luka Modric replacing Isco on 77 minutes. With the final whistle approaching, Benzema made the game save with the fourth.