Gomez, who started ahead of Miroslav Klose in attack, ended a turgid opening 74 minutes with a pinpoint header into the corner of the goal, outjumping Joao Pereira six yards out from Sami Khedira’s cross.
Portugal had hit the crossbar just before half time as defender Pepe’s close-range shot cannoned onto the line and away.
The game was a disappointing spectacle considering the talent on show, with much of the play getting bogged down in midfield as the Portuguese defended in numbers.
Gomez glanced an early header at goalkeeper Rui Patricio from a Jerome Boateng cross.
Arsenal’s new signing Lukas Podolski skidded a low first-time shot straight at the goalkeeper barely ten minutes in.
Cristiano Ronaldo skipped past Boateng down the left to slide a cross into the box, but Helder Postiga failed to make contact at the near post; Portugal’s first moment of danger.
The Germans had the ball in the net on 24 minutes, but French referee Stephane Lannoy decided to award a free kick against Portugal for a foul by Chelsea’s Raul Miereles on Real Madrid’s Sami Khedira in the buildup.
Podolski had plenty of time to line up a shot off a Mesut Ozil low ball from the left, but the Polish-born forward couldn’t keep it down.
Portugal proceeded to frustrate the Germans by defending in numbers, crowding out the midfield to ensure attacks came to nothing.
A fierce cross from Ozil was intercepted by Bruno Alves before the Germans missed a good double chance.
The ball fell to Podolski unmarked at the back post, he chose to volley it back across goal rather than shoot and Tomas Muller side-footed wide.
Portugal nearly took the lead against the run of play as Real Madrid defender Pepe struck the crossbar after a corner fell to him eight yards out. The ball crashed down onto the line but didn’t cross it.
The second half saw the pace pick up intially, as a chipped cross from Nani was athletically headed clear by Borussia Dortmund centerback Mats Hummels.
Mario Gomes directed a header over on 57 minutes after the Portuguese gave the ball away cheaply.
The Germans then lost the ball too easily themselves, allowed Nani burst through the center and release Ronaldo on the edge of the box, but Boateng got across quickly to charge down his left-footed shot.
Gomez headed home with Klose waiting on the touchline to replace him, prompting coach Joachim Low to send the Lazio striker back to the bench.
Ronaldo hit a trandmark dipping shot on 81 minutes that Manuel Neuer awkwardly palmed away.
Ronaldo then turned provider, poking to Real Madrid teammate Fabio Coentrao on the edge of the box only for Hummels to get a vital diving block in.
Portugal squandered the chance of the match with three minutes left. Substitute Nelson Oliveira set up fellow replacement Silvestre Valera, but the latter blasted straight at Neuer from point-blank range.
Holger Badstuber blocked a last-minute shot from Nani, and Bruno Alves headed over from the resulting corner.
The win takes the Germans joint top of the group after Denmark’s surprise 1-0 win over the Netherlands earlier Saturday.
Germany face the Netherlands next on Wednesday, with Denmark playing Portugal.
Germany: Manuel Neuer, Mats Hummels, Holger Badstuber, Phillipp Lahm, Jerome Boateng, Sami Khedira, Bastian Schweinsteiger, Mesut Ozil (Toni Kroos, 87), Thomas Muller (Lars Bengder, 90), Lukas Podolski, Mario Gomez (Miroslav Klose, 79).
Portugal: Rui Patricio, Bruno Alves, Pepe, Fabio Coentrao, Miguel Veloso, Joao Periera, Joao Moutinho, Raul Miereles (Silvestre Varela, 79), Nani, Cristiano Ronaldo, Helder Postiga (Nelson Oliveira, 69).
- 27/02/2014 Chedjou helps Galatasaray peg back Chelsea
- 27/02/2014 Majestic Madrid sweep Schalke aside
- 20/02/2014 Simeone encouraged by Atlético's 'solid step'
- 20/02/2014 Holders Bayern take control against Arsenal
- 17/01/2014 Supreme Court of Appeals upholds Fener chairman's prison sentence
- 08/01/2014 Balotelli to stay at AC Milan
- 16/12/2013 UEFA Champions League round of 16 draw
- 11/12/2013 Galatasaray-Juventus match delayed due to heavy snowfall
- 08/12/2013 FIFA Adjusts Russia-Belgium World Cup Kick-Off Time
- 04/12/2013 FIFA announces draw pots and procedures for 2014 World Cup
- 22/11/2013 Khazar Lankaran coach John Toschak resigns
- 11/11/2013 Barca confirm Messi to miss two months with muscle injury
- 08/11/2013 FIFA urged to introduce soccer etiquette
- 06/11/2013 FIFA President visits Iran
- 26/10/2013 Galatasaray to offer Drogba new deal
- 23/10/2013 Chelsea punish wasteful Schalke 3-0 in UEFA Champions League
- 23/10/2013 Lewandowski's late strike sinks Arsenal
- 23/10/2013 Coach of Turkey’s second-tier 1461 Trabzon dies
- 16/10/2013 Azerbaijani national football team in the qualifying round 2014 World Cup drew with Russia - 1:1
- 02/10/2013 Dortmund stun Marseille 3-0 in Champions League
- 30/09/2013 Galatasaray open talks with Roberto Mancini
- 24/09/2013 Galatasaray parts ways with coach Terim
- 21/09/2013 Michel Platini: “Ilham Aliyev wants Azerbaijan to be a world champion”
- 21/09/2013 Azerbaijani President Ilham Aliyev receives UEFA President Michel Platini
- 20/09/2013 Azerbaijan’s capital bid for EURO-2020 confirmed
- 18/09/2013 UEFA President Michel Platini to visit Azerbaijan
- 18/09/2013 Bayern Thrashes CSKA 3-0 in Champions League Match
- 11/09/2013 Turkey defeats Romania, boosts hopes for World Cup
- 31/08/2013 Bayern defeat Chelsea on penalties in Super Cup
- 30/08/2013 Turkey's Beşiktaş, Trabzon qualify for UEFA Europa League
- 29/08/2013 Turkey’s Galatasaray to face Real Madrid, Juventus in Champions League group
- 28/08/2013 CAS approves Fenerbahçe's two-year Europe ban
- 22/08/2013 President of German Eintracht FC: “Karabakh is under the occupation of Armenia”
- 09/08/2013 Karabakh faces Eintracht in UEFA Europa League play-off
- 09/08/2013 Fenerbahce drawn against Arsenal in Champions League play-offs
- 09/08/2013 Karabakh FC qualifies for the 4th round of Europa League
- 07/08/2013 Messi, Ronaldo, Ribery to contest UEFA Best Player
- 02/08/2013 Azerbaijan’s "Karabakh"FC wins the next match in the Europa League
- 26/07/2013 Karabakh FC qualifies for the next round of the UEFA Europa League
- 24/07/2013 Neftchi FC stopped the fight in the Champions League