Liverpool and Manchester City also made it six points out of a possible six in Europe this season, after Bayern needed a late Joshua Kimmich strike to claim a 2-1 win at Lokomotiv Moscow in Group A.
Leon Goretzka put the Germans ahead early on in front of a limited crowd in the Russian capital, but Anton Miranchuk tucked in an equaliser for Lokomotiv in the second half -- Miranchuk's twin brother Aleksei scored for Atalanta in the Champions League last week.
But Bayern were not to be denied a record 13th straight win in the competition as Kimmich controlled a Javi Martinez pass and volleyed home low from outside the box 11 minutes from time.
"We had to work hard for the victory," Kimmich admitted to broadcaster DAZN.
In the same group Atletico Madrid came from behind to beat Salzburg 3-2, with Joao Felix grabbing their late winner.
The Portuguese starlet had hit the bar with a stunning overhead kick before Marcos Llorente put Atletico ahead in the Spanish capital.
Dominik Szoboszlai levelled before the break and then a Felipe own goal put Salzburg ahead just after half-time.
However, Joao Felix equalised on 52 minutes and then won it five minutes from the end.
City cruise
In Germany, Real were heading for another defeat in Group B, six days after losing 3-2 at home to Shakhtar Donetsk, as Marcus Thuram netted twice for Gladbach, either side of half-time.
But Casemiro set up Karim Benzema to reduce the deficit in the 87th minute and the Brazilian midfielder then scored himself deep in injury time to salvage a point for Zinedine Zidane's team.
"If we continue to play like that, we'll do great things and we'll win matches, that's for sure," said Zidane.
It is Shakhtar who lead the section, though, by two points from Inter Milan and Gladbach, after a 0-0 draw with the Italians in Kiev.
Pep Guardiola's City eased to a second straight win in Group C with Kevin De Bruyne setting up Ferran Torres for the early opener against Marseille after the hosts had carelessly ceded possession.
Ilkay Gundogan and Raheem Sterling added late goals to make it 3-0, leaving Marseille without a point.
Guardiola was confident City could build on their victory after an indifferent start to the Premier League season which has seen them come in for criticism.
"Part of the criticism was right, but you've got to accept it. It's part of our job," Guardiola told BT Sport.
"It's about where we've come from in the last month, with lack of preparation, injuries and Covid-19, but the Champions League is in a good place now."
In the same group Porto beat Olympiakos 2-0 in Portugal with Fabio Vieira and Sergio Oliveira on target.
'Tough night' for Liverpool
Meanwhile, Liverpool built on their 1-0 victory at Ajax last week by defeating Danish champions Midtjylland 2-0 in a low-key game behind closed doors at Anfield in Group D.
Diogo Jota finished off a fine move to give Jurgen Klopp's team the lead early in the second half, before Mohamed Salah made sure of the points with a late penalty.
Klopp rested Salah, Sadio Mane and Roberto Firmino from his starting line-up but his defensive worries deepened as Fabinho went off with an apparent hamstring injury.
"It was a tough night," Klopp told BT Sport.
"It's a bit like in a marriage, there are good and bad times. It's not a bad time but it's a tricky time."
He added: "It was a hard game to play. But winning 2-0 is completely fine so that's it -- let's carry on."
Liverpool now have a double-header against Atalanta, who came from 2-0 down to draw 2-2 at home to Ajax.
A Dusan Tadic penalty put the visitors ahead on the half-hour and Lassina Traore made it two, only for Duvan Zapata to save Atalanta with two goals in the space of seven second-half minutes.
as/jc