The World Cup finalists will now bow out on Sunday unless they beat Portugal in their final game at the Metalist Stadium and Germany defeat Denmark the same day in Lviv, with a goal difference swing also needed to take the Dutch above Portugal and Denmark.
Portugal earlier beat Denmark 3-2 in a dramatic encounter, leaving Germany only needing one point against the Danes to be sure of reaching the last eight at Euro 2012 as winners of Group B – known as the “group of death” due to the strength of the teams in it.
Having scored the winning header in Germany's opening 1-0 victory over Portugal, Germany's Gomez marched to the top of the Golden Boot standings with a quickfire double.
His strikes, both assisted by Bastian Schweinsteiger, drew him level with Russia's Alan Dzagoev on three for the tournament.
The Netherlands gave themselves a late lifeline when Arsenal striker Robin van Persie pulled a goal back 15 minutes from time, but it was not enough to prevent their second Euro 2012 defeat after Saturday's shock 1-0 loss to Denmark.
Scorching temperatures in eastern Ukraine meant the game kicked off with the thermometer showing 29 degrees Celsius (84 degrees Fahrenheit).
Dutch team remained the samd
Dutch coach Bert van Marwijk surprisingly resisted calls to reconfigure his side as Bundesliga hotshot Klaas-Jan Huntelaar was again left on the bench, and the return of veteran centre-back Joris Mathijsen in place of Ron Vlaar was the only change in the Netherlands ranks. Joachim Löw kept faith with the same line-up that had beaten Portugal.
Perhaps stung by their Danish reverse, the Dutch made the brighter start, and they created the first clear opening on five minutes when a ball over the top evaded the German defence and fell to Robin van Persie, but the Arsenal striker could only fire his shot into the grateful arms of German keeper Manuel Neuer.
Germany replied as Mesut Özil hit the post from the edge of the penalty area on eight minutes, but the Dutch went back on the attack soon after as Van Persie fired wide this time.
The Germans took the lead on 24 minutes as striker Mario Gomez answered his critics with a moment of striking brilliance. Bastian Schweinsteiger's threaded pass beat the Dutch offside trap, and Gomez's instant control and balletic turn allowed him to beat Dutch goalkeeper Maarten Stekelenburg with a precise low finish.
The Dutch were enjoying plenty of possession, but their notoriously flimsy defence always looked vulnerable against Germany's swift counter-attacks. On 38 minutes they were again undone by the Bayern Munich pair as Schweinsteiger fed Gomez down the inside right channel and the striker planted a high finish inside Stekelenburg's far post.
Nearly three German goals
It could have been 3-0 to Joachim Löw's Germans as defender Holger Badstuber had headed an enticing free-kick straight at Stekelenburg before Gomez's second.
Dutch coach Bert van Marwijk shook up his attack after the break by bringing on Tottenham Hotspur's Rafael van der Vaart for captain and son-in-law Mark van Bommel, while Schalke striker Huntelaar was belatedly introduced for the peripheral Ibrahim Afellay.
The Oranje upped the pace and created several chances before Van Persie finally found his radar to put them back in the game. A clever turn past the otherwise excellent Mats Hummels allowed him to advance the edge of the area and slam an unstoppable shot past Manuel Neuer's left hand.
Both sides made changes in the last ten minutes with legs tiring in the stifling heat, as Fenerbahce's Dirk Kuyt came on for Bayern's Arjen Robben, who trudged off with his thunderous face summing up the Oranje's darkening mood, but the Dutch could not carve out a decent chance in the frantic final minutes.
Löw was understandably delighted with his side's impressive progress. "The door to the quarter-finals is now wide open," he said. He explained that winning the group would be particularly advantageous for his side, as it would secure a quarter-final in Gdansk, where Germany are based.
Löw could change the line-up
Löw will have at least one selection conundrum to ponder as right-back Jérôme Boateng will be suspended for the final group game, with Lars Bender and Marcel Schmelzer likely candidates to come in, but he indicated that he could consider unenforced changes as well.
"Maybe we could look at a few changes against Denmark as defensively they will be very, very tight," he said. "Maybe a few players need a break so if we make it to the quarter-finals they will be fresh."
The Netherlands still have a chance of joining Germany in the quarter-finals if they finish level on three points with Portugal and Denmark, but they will need their bitter rivals to do them a favour. If Germany beat Denmark, a win by two goals against Portugal will send the Dutch through on goal difference.
"We still have a chance to go through and we have to believe in it," said Netherlands coach Bert van Marwijk defiantly. "Thousands of fans have come here and we have to do well for them, we have to beat Portugal now to have a chance."
The Danes, however, are determined to bounce back from the disappointment of their 3-2 defeat to Portugal. Morten Olsen's side had battled back from 2-0 down with two goals from Nicklas Bendtner, and looked to be on the brink of a place in the last eight when Portuguese substitute Silvestre Varela fired in a late winner to steal the points.
The Danes look set to be without injury doubts Niki Zimling and Dennis Rommedahl against Germany, but defender Simon Poulsen warned Joachim Löw's side that the point they crave will not be surrendered easily. "Germany on Sunday will be a very difficult game but we have to go for victory," vowed the AZ Alkmaar man.