Karim Benzema, Marco Asensio and Vinicius Junior started up front for Los Blancos, who named Eden Hazard and Luka Modric on the bench.
Real had the first openings minutes following the start, with a probing ball from Karim Benzema left Yann Sommer scrambling to a save before Carlos Casemiro went over from range.
A strong save from Sommer before the half-hour mark pushed Toni Kroos' curling drive towards the far post behind following a galloping run towards the six-yard area.
Gladbach went ahead with their first chance on 33 minutes as a delightful through-ball from Alassane Plea spotted Marcus Thuram, whose first-time strike nestled into the top corner.
Los Blancos looked for a quick reply five minutes later through Asensio, but Sommer parried the Spaniard from an acute angle after a good ball from Federico Valverde.
Asensio was in on goal again two minutes from halftime when his shot across the area took a wicked deflection before cannoning off the crossbar from a corner-kick.
Madrid's hopes of a comeback got harder 58 minutes in after Thuram pounced on a spill from Thibaut Courtois to complete his brace with a simple tap-in following a shot from Plea.
Plea nearly gave the visitors more nightmares after three minutes from a one-on-one with Courtois, but the Belgian redeemed himself with a solid block.
Zinedine Zidane turned to the substitutes bench with 20 minutes remaining, and called on Hazard and Luka Modric with Kroos and Vinicius removed.
The interventions livened up the visitors who pulled a goal back in the final three minutes with a thumping overhead kick from Benzema.
Los Blancos levelled it up at the death when Casemiro, who assisted Benzema, found space on the edge of the area to rifle into the roof of the net to complete the comeback.