An 87th-minute own goal from Germany centre-half Jerome Boateng stunned the leaders after they had earlier pegged back the visitors.
Mario Mandzukic had cancelled out Stefan Kiessling's first-half opener with 13 minutes left but there was still time for Boateng to deflect substitute Sidney Sam's header into his own net.
Bayern's defeat leaves them four points ahead of second-placed Schalke, who beat Nurnberg 1-0 yesterday [Saturday].
Eintracht Frankfurt could have moved back above Schalke today [Sunday] but the were on the receiving end of Stuttgart's first home league win.
Vedad Ibisevic scored his side's winner for the second successive league game six minutes from the end. Alexander Meier had levelled for Frankfurt on 67 minutes after Christian Gentner's sixth-minute opener.
Borussia Monchengladbach scored three late goals to complete a memorable comeback and win 3-2 at Hannover.
The hosts were 2-0 up thanks to goals from Jan Schlaudraff (48) and Mame Diouf (53) but imploded in 10 second-half minutes.
Alvaro Dominguez (70) and Roel Brouwers (77) quickly drew Monchengladbach level before Juan Arango won it with 11 minutes left.
Schalke stayed on the coat-tails of Bundesliga leaders Bayern Munich with a 1-0 win at home to Nuremberg on Saturday.
Jefferson Farfan's 77th-minute goal settled the match and sent the Royal Blues up to second, four points behind Bayern having played a game more.
The win completed a week to remember for Schalke, who last weekend defeated champions Borussia Dortmund and in midweek won in the Champions League at Arsenal.
Dortmund also built on an impressive European win as they following their 2-1 success over Real Madrid with a 2-0 victory at Freiburg.
Neven Subotic broke the deadlock in the 54th minute and Mario Gotze made the points safe seven minutes from time.
Victory lifted Jurgen Klopp's side up to fourth, a point ahead of Mainz, who defeated Hoffenheim 3-0 courtesy of an Adam Szalai hat-trick.
The Hungarian scored in the 21st, 46th and 64th minutes to leave Hoffenheim battling at the wrong end of the table.
Wolfsburg moved off the foot of the table as Gunther Kostner's first match in caretaker charge ended in a 4-1 win at Fortuna Dusseldorf.
Kostner, handed the reins following the departure of Felix Magath, saw his side seize control of the game at the start of the second half.
Bas Dost put them ahead in the 50th minute and Ivica Olic made it two three minutes later.
Dost got his second in the 64th minute and, even though Jens Langeneke pulled one back from the spot, Diego scored a penalty for the Wolves in the 78th minute following the sending-off of Dusseldorf's Oliver Fink.
Greuther Furth dropped to the foot of the table following a 1-1 draw against Werder Bremen.
Edu put Furth ahead after eight minutes, but Nils Petersen equalised a minute before the break.
Sunday's Bundesliga Results
Saturday's Bundesliga Results
Friday's Bundesliga Results