Hungary looked like they would shock Germany and send them out of the tournament after Adam Szalai’s diving header in the 11th minute opened the scoring.
Kai Havertz drew Germany level in the 66th minute but Hungary retook the lead seconds after the re-start when András Schäfer ran past the defenders and headed the ball into the net.
But with coach Joachim Loew throwing on substitutes to gain the point needed to progess to the last 16, Goretzka’s strike provided Germany with the late life-line.Â