After thumping Augsburg 6-0 on Saturday, Bayern are unbeaten in their last 20 games dating back to November, but play third-placed Hoffenheim then host arch-rivals Borussia Dortmund, who are fourth, on Saturday.
Chances were plentiful for Bayern Munich, but it was Andrej Kramaric who helped secure a dramatic win for Hoffenheim.
Only Rafinha's last-ditch tackle had stopped Kramaric getting the home side off to a flying start in the second minute, but Hoffenheim maintained the pressure and again went close leaving Ulreich to berate his defence.
Julian Nagelsmann's men staged a faultless performance against the German giants and dictated the pace in the first half.
Despite a plethora of attacking options on his bench, Bayern coach Ancelotti kept faith with the starting XI at the start of the second half.
Second-placed RB Leipzig can now cut Bayern's lead at Mainz on Wednesday.
Latest News Hints at Arrival of Samsung Galaxy J7 (2017)
One aspect of display technologies that drives me insane on LG phones is the flawed auto-brightness settings. In fact, Samsung had to give a refund to all those who had pre-booked the smartphone last time around.
High-flying Hoffenheim deals Bayern its 2nd Bundesliga loss.
With time running out, Lewandowski forced Hoffenheim goalkeeper Oliver Baumann into a superb diving save as they hunted the equaliser.
- Bayern have failed to score in only three of the 40 competitive matches under Carlo Ancelotti, they lost each of those three matches 0-1: At Atletico, in Dortmund and at Hoffenheim.
Dortmund gained momentum in the closing period and rounded off the game with a third goal when Aubameyang utilized Kagawa's through ball to round Hamburg goalie Rene Adler for the 25th goal of the season.
Bremen's remarkable form under new coach Alexander Nouri continued with its sixth win from seven games unbeaten, taking the side - which was previously bottom - to eighth place, six points clear of the relegation zone.
Jojic scored his second goal in two games after picking up David Abraham's header outside the box before driving a shot past Lukas Hradecky and into the net via a post eight minutes into the second half.