Dublin IT were looking good for a place in the last eight when they led by four points at half-time, despite playing into a gusting wind.
Dublin’s Emmet Ó Connaighle and Mayoman Liam Irwin both cracked in goals in the opening half, with ‘The Ranch’ responding through Darragh Kavanagh, Niall Toner, Ronan O’Neill, and Kevin McKernan.
The Dubliners led by 2-2 to 0-4 at the turnaround, but the introduction of Conor Meyler gave the northerners an injection of energy.
They closed the gap through Brian Óg McGilligan, O’Neill, and Harry Loughran, before Armagh’s Peter Carragher drilled home a 54th-minute goal.
DIT keeper Conor Ferris denied Aidan McGarrity with a fine stop, and St Mary’s corner-back Aaron McKay shot the stoppage-time leveller that sent the tie to extra-time.
Substitute Killian O’Gara edged DIT back in front with a brilliant score, giving them a 2-6 to 1-8 advantage halfway through.
However, it was yet another Orchard saviour, substitute Jack Grugan, who came off the bench to land three long-range frees, which swung it for Paddy Tally’s side.
Peter Carragher 1-0, J Grugan 0-3 (3f), R O’Neill 0-2 (1f), N Toner, K McKernan, B Og McGilligan, D Kavanagh (f), H Loughran, A McKay 0-1 each.
L Irwin 1-1 (0-1f). E O Connaighle 1-0, K O’Gara 0-2, C Grimes, B McMahon, G Guilfoyle 0-1 each.
R Burns, P McAleer, D McBride, A McKay, H Loughran, N McParland, C McCooey, B Og McGilligan, P Carragher, C McCann, K McGeary, K McKernan, D Kavanagh, M Fitzpatrick, N Toner.
R O’Neill for McCooey, C Byrne for McBride, C Meyler for Toner, A Nugent for Kavanagh, A McGarrity for McCann, N McNicholl for McGilligan, McCooey for McAleer (BC), J Grugan for McGarrity.
C Ferris, K O’Brien, N Collins, P Reilly, S Clayton, G Guilfoyle, C Boyle, E O Connaighle, D Nelson, R McGowan, E Flanagan, C Madden, L Irwin, T O’Connor, B McMahon.
C Grimes for O Connaighle (BC), K O’Gara for Madden, B Power for Flanagan, G Reilly for O’Connor, Shane Cunningham for P Reilly (BC), Madden for McGowan.
M McNally (Monaghan).