Mainz took the lead when coach Thomas Tuchel brought rising stars Austria midfielder Ivanschitz and striker Andre Schürrle off the bench: teenager Schürrle supplied the final pass and Ivanschitz scored in the 70th minute.
Struggling Bundesliga side Cologne, meanwhile, sacked its Croatian coach Zvonimir Soldo on Sunday in the wake of the team's 2-1 defeat at Hannover.
Mainz's win gave the club their eighth win in nine games and put them two points clear of second-placed Dortmund, while Leverkusen are now fifth.
Earlier Dortmund needed a dramatic last-minute free-kick to salvage a point from their 1-1 draw against ten-man Hoffenheim.
With time almost up, Brazil midfielder Antonio da Silva curled in his shot in the 93rd minute and, amid the tense scenes, Hoffenheim midfielder Sejad Salihovic was sent off as he screamed his protests at the referee.
A single first-half goal from Hoffenheim's Demba Ba had earlier given them the lead in a bad-tempered match in front of 80,000 fans as Hoffenheim recorded 30 fouls in 90 minutes and received five yellow cards.
In an action packed opening 15 minutes, Hoffenheim took the lead after nine minutes following a pass from Brazilian Luiz Gustavo which found Senegal striker Ba at the far post and he beat Dortmund goalkeeper Roman Weidenfeller.
Dortmund were then denied an equaliser in controversial fashion.
Referee Wolfgang Stark awarded Dortmund a penalty on 15 minutes when Hoffenheim's Ghana defender Isaac Vorsah handled in the area.
Dortmund's Turkey midfielder Nuri Sahin slammed home the penalty, but Stark demanded the penalty be taken again because a home player had strayed into the area and Hoffenheim goalkeeper Tom Starke saved the second attempt.
The home side laid siege to the Hoffenheim goal, but could not convert their chances until the last minute.
"The draw was earned, we threw everything into the attack to try and get the goal," said relieved Dortmund coach Jurgen Klopp.
"The repetition of the penalty was crazy, but if I said anything more about the referee I would probably be banned for life. There were three or four brutal decisions against us."
Stuttgart are up to 14th and out of the relegation zone after they earned a 2-0 win over St Pauli as new coach Jens Keller picked up his first win since taking charge.
Defender Georg Niedermeier and Serbian midfielder Zdravko Kuzmanovic scored the goals for Stuttgart.
On Saturday, Champions League side Werder Bremen moved up to eighth after their 4-1 win over Borussia Mönchengladbach.
Cologne's decision to sack 42-year-old Croatian coach Zvonimir Soldo, meanwhile, came as no surprise, since his team has recorded just one victory this season after nine games and were second from bottom before Sunday's matches.
"The decision was not easy to take, but (Soldo) hadn't managed to stop this losing streak," said club president Wolfgang Overath. "The team showed so little against Hanover that we thought it necessary to act."
Having taken charge in July 2009, Soldo, a former Stuttgart player, spent last season battling to keep his team in Germany's top flight.
His successor looks set to be former Hamburg and Dortmund coach Thomas Doll, who was sacked by Turkish club Genclerbirligi recently.
Soldo is already the second Bundesliga coach to lose his job this season after Swiss trainer Christian Gross was sacked by Stuttgart earlier this month.