Novakovic double defeats Bayern
Bayern, who had not lost since the winter break, dropped from third place to fifth on 36 points, 15 behind leaders Borussia Dortmund who drew 0-0 with Schalke 04 on Friday.
Second-placed Bayer Leverkusen also lost ground, slumping to a 1-0 defeat at Nuremberg but stayed three points ahead of the Bavarians.
The champions had only themselves to blame after Bundesliga top scorer Mario Gomez, with his 16th goal of the season, and Hamit Altintop had put them in the driving seat.
The lowly hosts battled back after the break, repeatedly exposing Bayern's fragile back-line, and cut the deficit through Christian Clemens 10 minutes after the restart with a darting run.
Slovenian Novakovic headed the equaliser seven minutes later and the 31-year-old then timed his run perfectly in the 73rd when he raced clear to beat keeper Thomas Kraft with a low shot.
Bayern coach Louis van Gaal, without Dutch forward Arjen Robben because of flu, was left deflated on the bench as the debacle unfolded.
"We wasted a huge chance today to close in on the top spots," Dutchman Van Gaal told reporters. "It is quite unbelievable how we gave away this game after such a dominant first half. We tried hard after the 3-2 but it was too late."
Peruvian striker Claudio Pizarro threw Werder Bremen coach Thomas Schaaf a lifeline when he scored a stoppage-time equaliser in a 1-1 draw at Mainz, thus avoiding their third straight defeat.
Mainz are third while Werder climb to 13th on 23 points.
Hanover 96 joined Mainz on 37 points following a 1-0 win over lacklustre VfL Wolfsburg, who missed a penalty through Diego 10 minutes from time.
The defeat piles more pressure on Wolfsburg coach Steve McClaren, with his expensively-assembled team down in 12th place having won just one of their last 11 games.
"We lost this game ourselves and I am very disappointed with the result," McClaren told reporters, adding he was already looking ahead.
"Our new players have integrated well. There is more competition in the squad and I already have some ideas for a new system," said the former England manager.
VfB Stuttgart came from two goals down to snatch a dramatic 3-2 victory in their relegation clash at last-placed Borussia Moenchengladbach with Timo Gebhart keeping his cool to convert a penalty two minutes from time.