This was the Germany star's second Bundesliga hat-trick of the season as he capitalised on a poor Stuttgart defence to leave him with 12 league goals and 19 in all competitions for Bayern.
All five of Bayern's goals -- especially Gomez's three -- came from mistakes in the Stuttgart defence as coach Bruno Labbadia had a baptism of fire in his first league game in charge since taking over from Jens Keller last weekend.
"It is a shame we conceded the three goals," grumbled Bayern's Dutch coach Louis van Gaal after the rout.
"We have to improve that."
Despite the win, Bayern remain 14 points behind leaders Borussia Dortmund, who are 10 points clear of second-placed Mainz, and van Gaal insists the gap is too far to bridge as the Bundesliga breaks for winter on Sunday.
"We could make up four points behind if we were in second place, but Dortmund are already too far ahead," complained van Gaal who face Wolfsburg in their next league game on January 15.
Gomez opened the scoring with a well-taken strike on 31 minutes after Bayern's Thomas Mueller latched onto a mistake in midfield and then set up his Germany team-mate as Mueller netted Munich's second just five minutes later.
France midfielder Franck Ribery scored a superb individual effort when he took on the defence before unleashing an unstoppable shot on 43 minutes as it stayed 3-0 at the break.
Stuttgart fought back when second-half substitute striker Martin Harnik pulled a goal back for the hosts on 50 minutes, but Gomez struck twice in two minutes to complete his hat-trick just five minutes later.
Harnick grabbed a second before Germany squad member Christian Gentner made it 5-3 with 20 minutes remaining.
The result leaves Bayern fifth and 14 points behind leaders Dortmund, who lost 1-0 at Eintracht Frankfurt on Saturday, as the Bundesliga signs off for its customary winter break while Stuttgart are second from bottom.
Earlier Germany striker Patrick Helmes came off Bayer Leverkusen's bench to score the late equaliser which sealed a 2-2 draw with Freiburg to keep his side third.
The result leaves Freiburg sixth while Mainz went second on Saturday after a tense 4-2 win at wintry St Pauli.
Fourth-placed Hanover were stunned 3-1 at mid-table Nuremberg, while Champions League last 16-qualifiers Schalke picked up their third-straight league win with a 3-0 win over Cologne as Spain striker Raul hit a hat-trick.
It was his second in the German league since joining Schalke from Real Madrid at the start of the season and put his side 10th in the table.
Hoffenheim allowed a 2-0 lead to slip to a 2-2 draw at Wolfsburg as ex-England manager Steve McClaren's side fought back.
The result leaves Wolfsburg 13th in the league and just four points from the relegation zone, while Hoffenheim are eighth.
Werder Bremen slipped further towards the relegation zone when they were beaten 2-1 by Kaiserslautern to suffer their second straight defeat.
Both sides had players sent off in a bad-tempered match.
It was Bremen's eighth reversal of the season in 17 games and they are 14th in the league, four points above third from bottom Cologne.