- 21 Nov 2019 8:32 AM
The Juventus midfielder's 15th-minute header from Gareth Bale's left-wing cross saw Marco Rossi's team fall behind early on and then spurn several first-half chances to equalise before Ramsay put the destination of the three points beyond doubt with a composed strike in the opening moments of the second half.
Hungary head coach Marco Rossi went with his expected lineup, Péter Gulácsi taking his place in goal behind a back four of Zsolt Nagy, Ádám Lang, Botond Baráth and Gergő Lovrencsics at right-back.
Both first-choice central midfielders, Máté Pátkai and Ádám Nagy, were fit enough to start after recent absences with the more attacking trio of Roland Sallai, Dominik Szoboszlai and Balázs Dzsudzsák hoping to supply plenty of support to lone striker Ádám Szalai.
Both captains, Gareth Bale and Balázs Dzsudzsák - the latter on the occasion of his 108th cap which draws the winger level with Hungarian record-holder Gábor Király - had early shots, Bale's gathered easily by Gulácsi after Dzsudzsák's had sailed wide.
The game's first key moment wasn't far away though, Connor Roberts sliding the ball out to Bale on the right in the 15th minute and his left-footed cross into the six-yard box after cutting away from the byline proving perfect for Aaron Ramsay to head unchallenged into the Hungary net from close range.
Wales looked lethal on the counter-attack but Hungary were actually shading the percentage of possession and started to convert this into goalscoring chances.
Baráth headed Dzsudzsák's free-kick over the bar in the 27th minute and soon after, Szoboszlai had a penalty claim turned down before Wales countered swiftly, Bale again crossing from the right wing - this time with his right foot - but this time the ball was headed wide of the far, right post by Kieffer Moore.
Hungary then spurned two fabulous chances to level the scores, Szalai's knockback after Lovrencsics' incisive ball forward finding Szoboszlai in space ten metres from goal, but Hennessey dived to his right to block his bouncing shot and then gathered Sallai's effort on the rebound when a goal seemed certain.
Clearly the next goal was going to be hugely important and unfortunately it went the way of Ryan Giggs' side just two minutes into the second half. A left-wing free-kick from Ben Davies was volleyed down by Moore to Ramsey who had ghosted in at the back post and he applied a simple finish to double the home team's advantage.
Five minutes later, Bale's left-footed free-kick flew inches over the crossbar and midway through the half, Daniel James unleased a wickedly curling right-footed effort from the left side of the penalty area which just failed to find the far, top-right corner of Gulácsi's goal.
István Kovács and Roland Varga came on for Ádám Nagy and Dzudzsák as Rossi sought to inject fresh impetus into his side's search for victory, but the threat from the hosts was severe and constant. Gulácsi denied Ramsay a hat-trick in the 75th minute when he stuck out his left leg to kick away the Juventus midfielder's low shot after James' foray to the left byline.
Then, in the 82th minute, Chris Mepham headed the ball inexplicably wide from seven metres after Ben Davies's found him free in front of goal.
Substitute Harry Wilson's late, long-range drive was easily dealt with by Gulácsi but there was no doubt about which had been the better team on the day, Wales easing to a 2-0 win which means it is they who qualify with Croatia from this group for UEFA Euro 2020 next summer.
Hungary, meanwhile, will have to pick themselves up in time for March's Nations' League play-offs, which represent their last chance to qualify for Europe's premier national-team competition.