Holland’s own hopes of reaching the last eight now hang by a thread.
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 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 keeper.
Arsenal ace Van Persie was looking lively but still lacking 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 keeper 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 re-start.
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 left fly from outside the box and saw his drive flash inches wide of Neuer’s left-hand post with the keeper 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.