Robert Lewandowski cracked in his 20th league goal this season to give Bayern an early lead, but Gladbach hit back with two goals in four first-half minutes by Florian Neuhaus and Stefan Lainer.
Despite the defeat behind closed doors in Munich, Bayern remain nine points clear at the top of the table, but second-placed Borussia Dortmund can trim the gap on Saturday at Eintracht Frankfurt.
Gladbach climbed three places in the table to 11th after their second win over Bayern this season having already thrashed the Bavarians 5-0 in the German Cup last October.
With so many of his stars sidelined by Covid, Bayern coach Julian Nagelsmann named a patched-up squad with six reserve team players on the bench while forward Malik Tillman, 19, started his first Bundesliga match.
He was replaced in the second-half by Paul Wanner, who at 16 years, 15 days became the youngest Bayern player to make his German league debut having been called up from the club's Under-19 team.