Three sides were battling for a top-two finish in Group F ahead of the final round of fixtures, with two of those teams facing off in Budapest.
Cheered on by a fervent crowd inside the Puskás Aréna, it was the hosts who struck first in the fourth minute through Dániel Lukács.
Dominik Szoboszlai played a quick one-two with Liverpool team-mate Milos Kerkez from a short corner, which Lukács successfully converted with a diving header at the near post.
It was the worst possible start for the Irish, but they restored parity from the penalty spot after Attila Szalai was penalised for kicking Chiedozie Ogbene's trailing leg inside the box.
Parrott successfully dispatched the subsequent spot-kick, knowing one more goal without reply would seal at least a play-off place.
Marco Rossi’s side responded with vigour, as Caoimhín Kelleher denied Roland Sallai from deep inside the box after being superbly picked out by Lukács’ ball from the right-hand side.
However, Barnabás Varga re-established their lead before HT with an outstanding strike, expertly bringing down Kerkez's cross before unleashing an unstoppable left-footed effort past Kelleher.

The Boys in Green would have been looking at the likes of Ogbene to instigate another response, but the tireless forward appeared to pull a hamstring shortly after the restart in a further blow for the visitors.
His replacement, Adam Idah, produced a superb lofted finish over Dénes Dibusz, only to be denied by the linesman’s flag.
The Swansea City man was proving to be a handful, heading over from Finn Azaz’s cross to give further encouragement for Heimir Hallgrimsson’s side.
That encouragement turned into genuine belief when Parrott netted a brace in successive international appearances, producing a sublime lofted finish over Dibusz after being expertly spotted by Azaz.
Ireland were not done yet though, and Parrott’s last-gasp clinical finish completed the most remarkable of comebacks.
The luck of the Irish was certainly with the Boys in Green, who can still dream of playing in a first WC finals since 2002, while Hungary’s players will have to watch next summer’s showpiece from the comfort of their sofas in the hope of joining in on the party in 2030.
Flashscore Man of the Match: Troy Parrott (Republic of Ireland)
