Nicolai Muller gave the guests the lead with his fifth goal of the season, but goals from Mame Diouf and Artur Sobiech gave the hosts the lead before the break.
Two goals in as many minutes from Didier Ya Konan and Edgar Prib then wrapped up victory for Hannover, who move up to fourth in the process with Mainz dropping points for the first time this season.
Hannover coach Mirko Slomka gave Andre Hofmann his first start of the season in place of the suspended Szabolcs Huszti, so often the provider of the Reds' chances.
Diouf passed a fitness test, though, and was able to lead the Hannover attack.
Muller was Mainz's and the Bundesliga's top goalscorer coming into the game and he underlined his eye for goal, despite playing in a midfield role, to put the visitors ahead in the 12th minute.
His fifth goal of the season so far came from Christoph Moritz's pass, and he kept his cool to beat Ron-Robert Zieler in a one-on-one situation.
It was a deserved lead for Mainz, who had the chance to make it two through Shinji Okazaki, but Zieler denied him.
Hannover levelled in the 31st minute when Heinz Muller misread Prib's corner, leaving Diouf to head the ball in with Johannes Geis' clearance coming after the ball had already crossed the line.
The Reds were buoyed by the equaliser and Sobiech gave them the lead six minutes later, heading Lars Stindl's in from six yards out.
They had to wait until 10 minutes from time before feeling comfortable about their lead, though, with substitute Ya Konan placing his shot into the bottom left-hand corner from just outside the penalty area after good work by Leonardo Bittencourt down the right.
Prib then got in on the act to finish Mainz off with an angled shot into the corner.