Bayern's players celebrate after the 4-0 win over Nuremberg
Dutch striker Klaas-Jan Huntelaar also grabbed two goals, one a penalty, to lead Schalke 04 to a 3-1 win over Hoffenheim that took them up to second.
Forward Vedad Ibisevic levelled for Hoffenheim midway through the second half after Raul had given the hosts a 28th-minute lead with a controversial goal that led the referee to ask the Spaniard if he had used his hand.
Bayern, who entertain Napoli in the Champions League on Wednesday, netted three times in the first half as they bounced back in style from a surprise league defeat by Hanover 96 last week.
“The early goal helped a lot,” coach Jupp Heynckes told reporters, referring to Gomez’s second-minute opener.
“The team is playing excellent football, is confident with the ball and you can see they are enjoying the game. That is a crucial aspect of being successful.”
Champions Borussia Dortmund dropped to third with 20 points from 11 games, five points behind Bayern, after drawing 1-1 at VfB Stuttgart.
Borussia Moenchengladbach moved up to fourth, also on 20 points, after Marco Reus struck twice to earn a 2-1 victory over Hanover.
Hertha Berlin stunned VfL Wolfsburg 3-2, Pierre-Michel Lasogga notching the winner five minutes from time just seconds after the home team had levelled through Marcel Schaefer.
Heynckes brought back six players, including Gomez, who were rested for Bayern’s 6-0 German Cup win over Ingolstadt in the week and his team made a dream start when the Germany forward headed them in front.
Gomez then set up Bastian Schweinsteiger to rifle in from 18 metres before Franck Ribery added the third goal in the 39th minute after a fine solo effort.
Striker Gomez added his 12th league goal of the season in the second half, tapping in a Toni Kroos pass.
On Friday Michael Ballack’s goal gave Bayer Leverkusen a 1-0 win over Freiburg but the former Germany captain also suffered a suspected broken nose that makes him doubtful for the Champions League game with Valencia in the week.