Leverkusen was left reeling after the plucky minnows fought back from two goals down, but managed to get it together and came out on top in what proved to be thrilling game.
Robin Dutt's men thought they had the three points in the bag after Zdenek Pospech scored an own goal and Manuel Friedrich headed in a second just before halftime, but had no idea what was in store for them after the break.
Mainz hit the home side with a three-minute double salvo in the second period through Eugen Polanski and Marco Caligiuri, but Bender popped up with the winner to secure an important victory.
Leverkusen started the game superbly, intensively pressing Tuchel's side all over the pitch. The approach soon bore fruit as in the 10th minute a cross by Danny Da Costa was cleared into the net by Pospech.
Mainz was rarely threatening on the counter and aside from a speculative shot from distance by Polanski, the team barely managed to create a chance in front of Leverkusen goalkeeper Bernd Leno.
Dutt's men, however, were looking increasingly dangerous in attack, and soon doubled the lead through Friedrich, who headed in a corner from Gonzalo Castro inside the box to make it 2-0.
The second half got to the worst possible start for B04, however, as in the 50th minute Polanski took advantage of a poorly cleared ball by Leno, easily converting from close range to cut his team's deficit in half.
The Bayer Leverkusen goalkeeper was the villain once again just moments later when he was caught off his line, and was beaten by Caligiuri's delightful lob, which nestled in the top right corner.
Dutt's side, clearly stunned by the developments, threw everything forward in search of a winner. Germany international Bender rose to the occasion, sending an unstoppable header past Christian Wetklo to give Leverkusen the lead once again.
B04 survived a scare in the 77th minute, when Leno left Adam Szalai with a free header, but the former Real Madrid man could not find the target.
The result edges Leverkusen to within seven points of the Champions League positions in the Bundesliga, while Mainz remains in relegation trouble.