Ex-Borussia Dortmund head coach Peter Bosz did his former club a huge favour despite Leon Goretzka giving Bayern a 41st-minute lead.
Leon Bailey launched a fabulous free-kick into the top-left corner before Kevin Volland and substitute Lucas Alario sealed victory for a vibrant Leverkusen, who move up to seventh in the table.
Instead of being punished for their 1-1 draw at Eintracht Frankfurt, Dortmund's lead over Bayern at the summit edges up to seven points.
Mats Hummels survived an early penalty shout for handball when he blocked Volland's shot at close quarters.
Leverkusen centre-back Sven Bender required treatment after a pair of brave challenges to deny Robert Lewandowski, but his team fell behind shortly before the interval.
Kingsley Coman made the most of the hosts' high line to charge in on goal. Lukas Hradecky saved but Thomas Muller sent the ball back into the box from the right for Goretzka to head home.
Lewandowski thought he had made it 2-0 in first-half stoppage time, but a VAR review confirmed he was fractionally offside before stylishly converting Coman's pass.
Bosz's men made the most of that let-off by restarting on the front foot and Bailey's wonderful strike brought them level after Coman tripped Volland.
Bayern goalkeeper Sven Ulreich scampered towards the same corner to claw Julian Brandt's 60th-minute volley behind.
Coman continued to lead a flagging Bayern challenge and they were clinically sliced apart as Karim Bellarabi crossed for Volland to slot past the advancing Ulreich.
James Rodriguez had a close-range header blocked but a late Bayern onslaught never truly materialised before Alario dispatched Brandt's low cross in the 87th minute.
What does it mean?
Attacking verve, a relentless tempo and a perilously high defensive line – the year Bosz spent contemplating his Dortmund exit has not shaken his principles on the evidence of this thrilling Leverkusen display. Bayern must now make up seven points over the remaining 14 games, with the Bundesliga title slipping a little more from their once-firm gasp.
Brilliant Bailey back in the groove
Leverkusen winger Bailey established himself as one of the most sought-after young talents in Europe last season. His absence from January transfer gossip was indicative of a hard slog this term and the 21-year-old had one goal from 25 appearances in all competitions heading into the Bayern match. Hopefully a picture-book goal proves a catalyst as he adapts to an expansive style under Bosz that should suit his talents.
Sule fooled on winner
Bayern's defence regularly appeared ill at ease with Leverkusen's livewire forward line and centre-back Niklas Sule erred badly on the second goal. His decision to leave Volland and launch a desperate lunge on Bellarabi in full flight was flawed in both conception and execution. The Germany international will also not look back on Alario's goal with any fondness.
Key Opta facts
- Bayern suffered their fourth league defeat of the season, the same as in the whole of 2017-18.
- Efficient: Three of the four Leverkusen shots on target found the back of the net.
- David Alaba made his 328th appearance for Bayern in all competitions, drawing level with Uli Hoeneß.
Bayern travel to Hertha Berlin in the DFB-Pokal on Wednesday, 24 hours after Leverkusen take on Heidenheim of 2.Bundesliga in the same competition.