After a goalless first half on Sunday, Real opened the scoring through Vinicius Jr in the 70th minute but their lead was cancelled out by a Cristhian Stuani penalty 10 minutes later.
To make matters worse midfielder Toni Kroos was sent off in added time after receiving a second yellow card – the German’s first red card of his career.
Real were frustrated for more than an hour before finally making the breakthrough when their patient build-up play allowed Federico Valverde to put the ball into the six-yard box. Vinicius was on hand to tap it into the net.
Marco Asensio nearly doubled the lead two minutes later on a Real counter-attack, turning on the spot in the box and firing the ball at goal, but Girona keeper Paulo Gazzaniga made a spectacular reflex save to deny the midfielder.
Girona were handed a lifeline when Asensio handled the ball in the box and the referee awarded a penalty following a VAR check. Stuani sent Thibaut Courtois the wrong way to level.
“We’ll try to correct today’s mistakes. We couldn’t get three points today but any team would want to be where we are. We deserved to win,” Real defender Dani Carvajal told Movistar.
Real’s Rodrygo thought he had won the game at the death when he fought for the ball in a goalmouth scramble with Gazzaniga, but the referee disallowed his goal as the keeper was in control of the ball when the Brazilian bundled it in.
“I think this is a reward for all the effort we put in… To come here and get a result is not easy and we deserve credit for the way we played throughout the 90 minutes,” Stuani said.
“We had to close down spaces, we know if we give them space they are incredible. We waited for our chances and they came, you always have to suffer here (at the Bernabeu).”
Earlier Osasuna cruised to a 2-0 home win over Valladolid with Chimy Avila and Moi Gomez each scoring in the first 20 minutes.
It was the second win in three matches for Osasuna, who moved to sixth place and into the European qualifying spots.