Gomez, who had scored the winner in Germany’s opening win over Portugal, opened the scoring in the 24th minute and added his second in the 38th before Robin van Persie reduced the deficit 17 minutes from time.
The result means Germany need just a point from their final Group B game against Denmark to guarantee progression, while Holland need to beat Portugal and hope for both a Germany win and a swing in goal difference.
Bert van Marwijk’s men had shaded the opening exchanges, with Arsenal striker van Persie shooting straight at Manuel Neuer as he sought to atone for a series of missed chances in the Dutch defeat to Denmark.
Mesut Ozil responded for Germany with a ninth-minute volley which struck the base of Maarten Stekelenburg’s left-hand post before the ball was gathered by the grateful Dutch goalkeeper.
Van Persie was looking lively but still lacking that killer instinct, and another opportunity went begging when Ibrahim Afellay’s cross towards the striker was crucially intercepted by Mats Hummels.
Gomez put Germany ahead in the 24th minute with an excellent finish after Bastian Schweinsteiger’s through-ball cut the Dutch defence in two. Gomez turned and fired the opener low to Stekelenburg’s right.
Arjen Robben slammed a long-range effort straight at Neuer as Dutch frustration began to tell, although they were secure in the knowledge they could not face elimination due to Portugal’s earlier win over Denmark.
It was just as well, as the Germans continued to exploit glaring weaknesses in the Dutch defence, particularly down the right flank, and Holger Badstuber should have made it 2-0 in the 37th minute when he headed straight at Stekelenburg from point-blank range.,
But one minute later Germany did have their second from another move originating on the right, Schweinsteiger playing in Gomez who looked up and slammed an unstoppable shot across the goalkeeper from a tight angle.
Germany almost made it 3-0 on the stroke of half-time when Schweinsteiger’s free-kick struck Robben and looked set to loop into the top corner only to be brilliantly tipped over by Stekelenburg.
Van Marwijk introduced both Klaus-Jan Huntelaar and Rafael van der Vaart at the break but the Germans continued to press, with Hummels denied by Stekelenburg twice in a matter of seconds seven minutes after the restart.
With the Dutch forced to push forward they also had chances with Robben seeing his drive deflected over by Philipp Lahm, then Robben crossing from the left to van Persie whose powerful low drive was well saved by Neuer.
Holland came even closer to reducing the deficit in the 62nd minute when Wesley Sneijder let fly from outside the box and saw his drive flash inches wide of Neuer’s left-hand post with the goalkeeper beaten.
Another Schneijder effort was blocked in the box by Jerome Boateng with a suspicion of handball, before the Dutch pressure paid off with van Persie finally breaking his Euro 2012 deadlock in style.
The striker turned and drifted across from the left flank before drilling a brilliant finish past Neuer from the edge of the box to give his side hope with 17 minutes of the match still to play.
The Dutch were suddenly dominant, with van Persie having a penalty appeal waved away before Robben expressed his frustration at being substituted by exiting the pitch on the far side of the field in front of the Dutch fans.
But their push for an equaliser was almost undone in the 89th minute when Stekelenburg made a mighty hash of a back-pass and almost presented German substitute Miroslav Klose with the simplest of chances to wrap things up.
Italy will look to beat Croatia for the first time in a competitive game in today’s European Championship match in Poznan.
The Italians take on the Group C leaders needing a win to keep up their hopes of progressing to the next round.
Italy held holders Spain to a 1-1 draw in their pool opener while Croatia beat the Republic of Ireland 3-1.
Coach Cesare Prandelli could make some changes to the squad but Manchester City forward Mario Balotelli is set to keep his place in attack alongside Antonio Cassano.
“This is a different rival to Spain and even more dangerous because Croatia can change their style of play during a game,” Prandelli said.
“Croatia are unpredictable, hence we need to be all the more prepared than we were against Spain.”
The Azzurri go into the encounter at Poznan’s Municipal Stadium looking to halt a four-match winless run.
Croatia will rely on strikers Mario Mandzukic and Nikica Jelavic, who combined for all three goals against Ireland, to lead his attack once more against Italy. Slaven Bilic’s side will face world champions Spain in their final group game next Monday.