Bayern were cruising at half-time thanks to strikes from Harry Kane and Serge Gnabry but conceded three times in the second half, losing their second match in a row.
Florian Wirtz converted a penalty deep into first-half stoppage time as Leverkusen were made to work hard in the German capital against 10-man Union, extending their unbeaten run this season to 41 games.
Xabi Alonso’s side need just three points from their remaining six matches to clinch a first league title in the club’s history.
Bayern, on a streak of 11 straight Bundesliga titles, could relinquish their crown next week in between the first and second legs of their Champions League quarter-final against Arsenal.
Union did their best to hold on despite Leverkusen’s relentless pressure but gave way just before half-time, Germany defender Robin Gosens picking up a second yellow for a desperation tackle on Nathan Tella near the penalty box.
After some chaotic scenes from the ensuing free-kick the ball connected with the arm of Union captain Christopher Trimmel, giving Leverkusen a penalty after a long VAR review.
Wirtz calmly dispatched the penalty, his third goal in his past two games.
Late in the second half word filtered through to the visiting fans that Bayern were trailing at Heidenheim, sending them into raptures.
Bayern looked in fine form early, despite missing several injured first teamers including captain Manuel Neuer, Leroy Sane and Kingsley Coman, with coach Thomas Tuchel taking a cautious approach with Tuesday’s Champions League trip to Arsenal in mind.
The ever-reliable Kane, yet to miss a league match this campaign, opened the scoring, scrambling in a Gnabry assist after 38 minutes.
Gnabry seemingly had Bayern on track for a simple victory when he scored just before the break, but the hosts turned the match around early in the second half.
Bayern rocked
Kevin Sessa and Tim Kleindienst both scored inside the space of 90 seconds to level the scores and stun the visitors.
Kleindienst struck again with 11 minutes remaining to snatch victory in their first home match against Bayern, a goal celebrated 460 kilometres away in Leverkusen.
Elsewhere, Belgium forward Lois Openda scored a first-half brace as RB Leipzig won 4-1 at Freiburg, leapfrogging Borussia Dortmund into fourth.
Amadou Haidara opened the scoring just one minute in and Openda added two more before half-time either side of a missed penalty from Freiburg’s Lucas Hoeler.
Openda, who arrived from Lens last summer, now has 21 goals for the league campaign.
Dortmund can overtake Leipzig back into fourth, the final guaranteed Champions League spot, by avoiding defeat when they host Stuttgart later on Saturday.
Mainz won 4-0 at home over last-placed Darmstadt to keep their hopes of avoiding relegation alive.
They have lost just one of their past five and sit in the relegation play-off spot, five points from safety.
Cologne also boosted their bid to avoid relegation, scoring twice in added time to win 2-1 at home against Bochum.
AFP