Longford made the sharper start and took the lead when Dean Williams converted from the spot after 10 minutes. Cork City responded well and Cillian Murphy brought the home side level on 27'35'', but the visitors landed another blow right on 45'00'' when Pharrell Manuel restored the away advantage for a 2-1 half-time score.
The second half flipped quickly. Josh Fitzpatrick struck on 69'44'' to make it 2-2, and Cork looked to have completed the turnaround less than two minutes later when Murphy grabbed his second of the night at 71'36'' for a 3-2 lead.
That was not the end of it. Longford stayed in the contest and found their equaliser through Daragh Murtagh on 85'57'', setting up a frantic finish. Stefan Ugbesia then delivered the decisive moment at 90'00'', scoring the goal that completed a stunning 4-3 comeback and settled the final score.
For Cork, the defeat was a painful home setback despite another strong attacking display. For Longford, the summary was simple: four goals, late nerve and a statement result against the league leaders.