Having broken his 13-match scoring drought for Bayern with a hat-trick in last Saturday's 3-0 league win over Hannover, and scored in Germany's 3-0 win in Kazakhstan last week, Gomez hit Munich's third against Romanian side Cluj.
The 25-year-old, who last year became the Bundesliga's most expensive transfer when Bayern bought him from Stuttgartfor €30 million, had an easy late tap in, but Munich were uninspiring despite the victory.
"Today, we can be thankful for all three goals, it was a very strange game," said Gomez. "That is the way things go in football: for weeks, I have scored no goals and now suddenly the scoring touch is back."
Last season's beaten finalists were far from impressive as Cluj scored all-bar-one of the goals and gifted Bayern two own-goals.
"We haven't had much luck this season, but we had a fair bit of it today," said Bayern coach Louis van Gaal.
"It is always difficult if the opponent plays with ten-men behind the ball. The midfield played very well and controlled the game well. We shouldn't have conceded the second goal, but we deserved to win."
Bayern were missing a host of stars including Arjen Robben, Frank Ribery, Breno, Diego Contento, Mark van Bommel, Miroslav Klose plus David Alaba. The lack of star-quality showed.
They have now won all three of their Group E matches so far, but the first three goals were all scored by Cluj players as Portugal defender Cadu netted for both sides.
The centre-back gave the Romanians a shock lead when he headed home a free-kick from Italian midfielder Roberto de Zerbi on 28 minutes to silence the crowd at Munich's Allianz Arena.
But the Portuguese defender was left with his head in his hands just four minutes later when a shot from Bayern's Germany midfielder Toni Kroos deflected off his leg into the back of the net to equalise.
And Bayern took the lead when Cluj's Romania defender Cristian Panin watched as a shot from Bayern defender Holger Badstuber hit him on the knee and the ball flew into his own net on 37 minutes.
Cluj almost went in all-square at the break as Ivory Coast forward Lacina Traore beat the Bayern defence and goalkeeper Hans-Joerg Butt from 16 metres out, but clipped the post with his shot.
Gomez then netted his fifth goal in three games when he managed to stab his shot past Cluj goalkeeper Eduard Stancioiu on 77 minutes.
The visitors threatened a late fight-back when Argentinian midfielder Juan Culio wrong-footed the home defence and beat Butt with his shot on 86 minutes, but Bayern held on for the win.
This was Bayern's sixth straight home victory in the Champions League dating back to last season and travel to face the Romanians in the next round of matches on November 3.