After suffering for an hour, Bayern emerged from their shells to show why no German side has managed to beat them in 51 attempts.
Bastian Schweinsteiger and Mario Gotze sealed victory with goals inside the final 10 minutes, but with Borussia Dortmund winning against Hannover it means Bayern will have to wait just a few days longer before being officially crowned Bundesliga champions again.
Bayern knew that they could have got both hands on the Bundesliga trophy with victory in Mainz, if other results favoured them, but they left with their 24th title still a whisker away.
Mainz were clearly against the idea of Bayern celebrating on their pitch and chose to fight fire with fire.
Rather than getting men behind the ball and defending, Mainz took the option of attacking Bayern, busying goalkeeper Manuel Neuer most than many sides this season.
Koo Ja-Cheol was particularly menacing down the Mainz left while Eric-Maxim Choupo-Moting sent in the first shot on Neuer's goal, which the Bayern and Germany goalkeeper saved with his foot.
Choupo-Moting went even closer early in the second half with a shot from just inside the area which beat Neuer, but struck the crossbar.
That was enough for Bayern, who kicked into gear with Mario Mandzukic missing with a volley before seriously testing Loris Karius for the first time with a header.
Bayern increased the pressure before finally making the breakthrough.
Schweinsteiger, the man whose goal sealed the title for Bayern in Frankfurt last season, scored the 82nd-minute goal which took them to within another victory of glory, heading in Xherdan Shaqiri's cross from the left.
Mainz's resistance was broken and a second goal followed four minutes later with Gotze given an easy tap-in by Franck Ribery with Karius out of his goal.
Bayern will clinch the title should they win at Hertha Berlin on Tuesday.