Löw has said he was wary of the Netherlands in their next match on Wednesday following their shock defeat to Denmark - even thoguht Germany got off to a good start in the competition.
After victories both in the quarter-finals of Euro 2008 and the third-place play-off at the 2006 World Cup, this Germany's third straight win over Portugal in major tournaments to give Germany a winning start in Group B which was watched by over 22 million people in Germany alone.
"It was a really close game, but it has given us a good start," said Löw, whose team now face the Netherlands on Wednesday in Kharkiv.
"We did well in defence, we worked hard which wasn't always the case in our warm-up game.
"We have work to do up front with the tempo; it was there in phases, but we have to be more consistent."
Despite the attacking threat posed by Portugal captain Cristiano Ronaldo, the Real Madrid star had a subdued night by his own lofty standards and he rarely got the better of his marker Jerome Boateng.
Löw sprang a surprise before kick-off by leaving out experienced centre-back Per Mertesacker for the match at the Lviv Arena, the smallest of the eight Euro 2012 venues, in front of 32,990 fans.
Bayern Munich's Holger Badstuber partnered Borussia Dortmund's Mats Hummels in the centre of defence with captain Philipp Lahm at left-back and Bayern's Boateng on the right.
Veteran forward Miroslav Klose, who turned 34 on Saturday, was left on the bench with goal-scorer Gomez starting as the lone striker.
After Denmark's shock 1-0 win over the Netherlands earlier, victory give Joachim Löw's Germans an early advantage in the pool, which has been dubbed “the group of death”.
"I am sad about the result, I felt we controlled the game and defended well," said Portugal coach Paulo Bento, who had opted for a 4-3-3 formation with Helder Postiga leading the attack.
"We had bad luck when the ball hit the bar, while they had good luck with Gomez's goal. We have to do everything to get the players fit for Denmark."
Germany had the better of the opening exchanges with Gomez's header forcing Portugal goalkeeper Rui Patricio into a diving save and Arsenal-bound forward Lukas Podolski firing in a shot which the Benfica star struggled to collect.
Zaragoza forward Helder Postiga picked up the first booking of the game when he clattered Germany goalkeeper Manuel Neuer and Portugal's first attack came after 15 minutes when Ronaldo found space on the left.
With the Portuguese turning up the pressure and halftime approaching, Badstuber was booked for a foul on Manchester United's Nani.
Madrid star Pepe came perilously close to putting Portugal ahead a minute before the break when his strike beat Neuer, but deflected down off the crossbar onto the goal-line to bounce away from danger.
The second-half settled into a nervy affair and with 25 minutes left a great pass from Porto midfielder Joao Moutinho found Ronaldo in space, but Boateng responded quickly enough to snuff out the threat.
The German was later booked for fouling the Real star moments later.
With Klose waiting on the sidelines to replace him, Gomez finally got the breakthrough he had earlier promised when he met Sami Khedira's cross to place his header outside the reach of the diving Patricio on 73 minutes.
In the dying minutes, only desperate defending denied Portugal an equaliser as the German back line managed to squash a strike from replacement forward Silvestre Valera, who had the goal at his mercy.
In Wednesday's next round of Group B matches, Germany face the Netherlands in Kharkiv while Portugal take on Denmark back here again in Lviv.