Jupp Heynckes' side was left stunned when Jerome Boateng sent the ball past Manuel Neuer to ensure his side's first Bundesliga defeat of the season.
Stefan Kiessling got a breakaway goal for the visitors just before halftime, but Mario Mandzukic equalized for the dominant hosts with 12 minutes left to play. However, with die Roten pressing for a winner, Sidney Sam's header was diverted past Manuel Neuer by the unlucky Boateng.
The Bavarians were the ones to start the game on top. Within two minutes of kickoff, Toni Kroos sprayed a ball to Thomas Muller on the right wing, and the Germany winger wasted no time in sending in a crisp cross that Bastian Schweinsteiger tried, in vain, to divert into the net.
Soon after, David Alaba picked out Schweinsteiger, who found himself crowded out by Stefan Reinartz before he could get away a shot, before the Bayern vice-captain sent in a cross to Muller, who headed wide.
Holger Badstuber was the next player to centre the ball, and Mario Mandzukic forced a great reaction save from Bernd Leno, who got down well to parry it, and Alaba was inches away from diverting the ball into the net.
The early Bayern Munich wastefulness came back to haunt them. Leverkusen counterattacked superbly, and Simon Rolfes released Andre Schurrle, who pulled it across the face of goal for Kiessling, who tapped home.
After the halftime break, Bayern needed to take back the impetus. Heynckes introduced Xherdan Shaqiri in the place of Holger Badstuber, and the Swiss youngster almost made an immediate impact, picking out Kroos, who sent a shot wide via a deflection.
Shaqiri came close to grabbing an equalizer soon after with a 25-yard effort that Leno did well to parry, before the former Basel man picked up a booking for a cynical dive in the area which was rightly punished.
Time was running out for the Bavarians to get back into the match, and Leverkusen's stern defense showed no signs of subsiding, until the 77th minute. Claudio Pizarro, fresh on as a substitute, played in Mandzukic, who headed into the net with Leno stranded.
Within seconds, they were within inches of turning the game on its head entirely. Pizarro drove a cross-shot across the face of goal, it struck the bewildered Mandzukic, and bounced agonisingly off the post.
The hosts pressed for a winner, but four minutes from time, they were left reeling when Sam's header hit off Boateng for the decisive moment, as Leverkusen claimed its first away win at Bayern in more than 20 years.