After Leverkusen captain Simon Rolfes had scored a seventh-minute own goal, Gomez found the net in the 28th and 44th minutes plus in stoppage time for Bayern to reclaim third place in the standings.

Eren Derdiyok pulled one back for Leverkusen in the 62nd, but Franck Ribery extinguished hopes of an unlikely comeback 13 minutes later in Bayern's first game since firing Louis van Gaal as coach.

Leverkusen remains second behind Borussia Dortmund, which can extend its lead to eight points by beating Freiburg at home in the late game.

Bastian Schweinsteiger and Franck Ribery overcame injury worries to start, and it was Schweinsteiger's header from a corner by Ribery that struck the unfortunate Rolfes in the face before going into the net.

Leverkusen slowly came into the game with some slick passing moves, before Arturo Vidal's ill-advised back heel in his own penalty area gifted possession to Thomas Mueller. The German international spotted Gomez, who flicked the ball inside the left post from close range.

Mueller also created the next goal, racing onto Daniel van Buyten's through ball and crossing for Gomez to finish with ease from six meters (yards).

Gomez completed his hat trick two minutes later, blasting the ball under goalkeeper Rene Adler after he had been picked out by Schweinsteiger.

With the game all but decided at halftime, Leverkusen looked short of ideas after the break. A free kick from Renato Augusto sailed harmlessly over the bar in the 52nd, before Hanno Balitsch shot wide under pressure from the impressive Diego Contento.

Heynckes reacted by bringing on Stefan Kiessling for the ineffective Renato Augusto in the 56th, and the striker came close to scoring minutes later when he launched himself at a cross from Balitsch.

Derdiyok capitalized on a defensive mix-up between Van Buyten and Schweinsteiger to score from close range, while Leverkusen midfielder Michael Ballack should have scored against his former side shortly afterward but was unable to direct his header on target.

Derdiyok forced Joerg Butt — back in goal for the erratic Thomas Kraft — into his first save of the game in the 70th.

Ribery scored his fifth goal of the season when he played a one-two with Van Buyten before slotting past Adler with ease.

Andreas Ottl hit the crossbar for Bayern late in the game.