Bayern has won 18 of their last 19 games and is 16 points clear on the table.
However, a dreadful start left Bayern 2-0 down at home — the first time that has happened since January 1977 — after just 12 minutes.
Bayern’s Joshua Kimmich brought down Serge Gnabry, who returns to Bayern next season when his loan spell at Hoffenheim ends, in the area with two minutes gone and the referee pointed to the spot.
Bayern goalkeeper Sven Ulreich saved Gnabry’s spot-kick from Gnabry only for Mark Uth to tap home the rebound with three minutes gone.
Bayern’s fortunes dived further when Jerome Boateng’s poor pass was snapped up by Gnabry who drove the ball into the bottom left-hand corner.
However, Bayern was level with 25 minutes gone.
Lewandowski began the charge by tapping home Kimmich’s shot and Boateng made amends by heading home to make the score 2-2 at the break.
Kingsley Coman gave Bayern the lead for the first time with an hour gone before Arturo Vidal headed the fourth on 66 minutes.
To compound Hoffenheim’s misery, their ex-striker Sandro Wagner scored his first Bayern goal on 90 minutes to complete the comeback.
“We were asleep at the start – we weren’t aggressive enough and gave them too much ball,” said Boateng.
“But we reacted really well and deserved the win.”
– Aubameyang back, Dortmund draw –
Arsenal target Pierre-Emerick Aubameyang produced a poor display on his Borussia Dortmund return in their 2-2 draw against Freiburg whose captain Nils Petersen netted twice.
Aubameyang was dropped for Dortmund’s two previous games as his club reportedly rejected a second bid by Arsenal of 58 million euros ($72m).
The German club are reportedly holding out for 70 million euros for their top scorer.
Dortmund went ahead when Shinji Kagawa volleyed home his second goal in as many games on nine minutes.
Aubameyang, who headed over on 32 minutes, was booed by home fans whenever he went near the ball.
Freiburg drew level on 21 minutes when Petersen fired home at the near post.
Petersen grabbed his second with a spectacular shot after pouncing on a Nuri Sahin mistake and lobbed Dortmund goalkeeper Roman Burki from 30 metres.
However, Germany Under-21 left-back Jeremy Toljan spared Dortmund’s blushes with a 93rd-minute equaliser.
Dortmund are fifth in the table after their third straight draw.
– Schalke regain second –
Schalke reclaimed second spot from Eintracht Frankfurt, who beat Borussia Moenchengladbach on Friday, with a 2-0 win at VfB Stuttgart.
Brazil centre-back Naldo gave the Royal Blues the lead before Morocco’s Amine Harit slotted in a penalty.
Fourth-placed RB Leipzig were held to a 1-1 draw at home to second-from-bottom Hamburg, whose new head coach Bernd Hollerbach picked up a point on his first game in charge.
Portugal midfielder Bruma gave Leipzig the lead on nine minutes, finishing a counter-attack when Hamburg’s Aaron Hunt lost the ball.
However, Hamburg broke their run of four straight defeats when Filip Kostic hit their equaliser on 29 minutes.
Bottom-side Cologne were denied a fourth straight victory in their 1-1 draw against Augsburg.
Milos Jojic curled in a superb free-kick on 40 minutes before Brazilian midfielder Caiuby headed home an equaliser 22 minutes from time.