The former Liverpool forward scored his first from the penalty spot on the stroke of half-time to make it 2-0 after Roberto Firmino's opener.
The Holland international made it three in the 74th minute before Nikolce Noveski's late own goal completed a miserable night for the hosts.
Firmino forced Mainz goalkeeper Heinz Muller to save with his feet with a shot from 12 yards early on, while at the other end Tom Starke tipped Sami Allagui's effort over the bar.
The visitors were soon up and running, though, Firmino seizing on a mistake in midfield by Eugen Polanski, running towards goal and guiding a right-footed shot into the bottom corner.
The visitors got another break in the 45th minute when they were awarded a debatable penalty for Zdenek Pospech's foul on Edson Braafheid.
Babel fired the spot-kick straight down the middle.
Mainz needed a strong start to the second half if they were to get back into the contest and they got it, only to find Starke in excellent form.
The keeper tipped Allagui's shot over the top after the striker was set up by Andreas Ivanschitz and then parried away Marco Caligiuri's effort from the edge of the area.
Instead Babel settled the contest with a third for Hoffenheim, latching onto a through-ball from Daniel Williams and, one on one with Muller, shooting low into the corner.
And things went from bad to worse for Mainz with five minutes to go as Noveski diverted Sven Schipplock's ball across goal into the corner of his own net