Cristiano Ronaldo collected another record, matching Miroslav Klose as the record scorer at the Euros and World Cup combined, but it could not prevent a humbling.
Germany had shown more aggression, intent and offensive direction in the opening 14 minutes against Portugal than they had during the entire defeat to France.
It seemed certain their verve would be rewarded, and sure enough, Gosens smashed in a sublime finish at the far post after a searching cross from the right.
It was a worthy way to mark Germany’s dominance, but Serge Gnabry was fractionally offside when the ball was played and made an attempt for it, interfering with Rui Patricio.
VAR rightly chalked off the goal and Portugal were immensely relieved, but still completely unable to live with Germany’s blitz.
Havertz prompted Patricio into a sharp low save to the left and Ruben Dias applied a vital block to deny a Toni Kroos hit.
Fernando Santos’ men were reduced to spectators to the Germany show and were shaping up for a hiding before a stunning counter-attack.
Kroos delivered a corner that Cristiano cleared before cantering towards the other end. Bernardo Silva picked up the ball, sprinted down the right and sent a stellar lofted ball in the direction of Diogo Jota.
The Liverpool forward timed his run excellently, controlled well and then squared for Cristiano to tap into an open goal in a 14-second masterclass.
Germany were stunned, with their confidence and surety wiped out for a while. Joshua Kimmich and Gosens were the luminaries to resurrect them. The latter’s direct, intelligent play tortured Nelson Semedo on Portugal’s right flank and led to the equaliser.
In a matter of four minutes, Germany were in control of the encounter again courtesy of dynamic play that drew two own goals.
Gosens, supplied by the mesmeric Kimmich, volleyed in an inviting a cross with his left into the danger area, which Havertz attacked. Dias tried to impede him, but ended up getting the final touch six yards out.
Raphael Guerreiro, facing his own goal, then agonised as the ball came off his shin when he looked to kill Kimmich’s cutback.
As the match had started, totally shaded by Germany, so it continued to materialise.
Gosens continued to twist and torture Semedo while supercharging his side. On 51 minutes, he stayed onside and rolled a neat pass across the six-yard box for Havertz to convert from close range.
The Kimmich-Gosens combination silkily cut through Portugal again. The pair were the decorators on the end of a delightful team move featuring one-touch passing from Ilkay Gundogan, Thomas Muller and Havertz.
Kimmich was criminally offered time and space to pick out Gosens at the back post, who headed in to crown an MVP performance.
Joachim Low turned to fresh legs and took off his star man on the evening for Marcel Halstenberg, with Mats Hummels replaced by Emre Can.
The changes temporarily destabilised Germany and Portugal were enlivened by the introductions of Renato Sanches, Joao Moutinho and Rafa Silva. Bruno Fernandes was anonymous again and the directness of the substitutes proved more troublesome for Low’s charges.
On the 67-minute mark, passive defending saw Germany allow a free-kick to sail towards the far post. Cristiano did brilliantly to keep the ball alive as it looked more likely to drift out of play, hooking it across goal where Jota powered it in.
Sanches, who has been one of Portugal’s best weapons in the tournament, thundered in a strike from distance that cannoned off the woodwork.
Niklas Sule made a vital interception to thwart Cristiano and Pepe headed into the danger area but none of his team-mates could meet it.
Germany had done more than enough to record an impressive win, supplying the premier attacking display of the Euros thus far.