Cork 1-17 Galway 1-16
Cork came from five points down ten minutes into the second-half to book a place in the All-Ireland quarter-finals with a late flourish.
Galway, appearing in Croke Park for the first time in five years, looked set for a surprise result when they built on an interval lead of 0-8 to 0-7 against the breeze to lead by 0-13 to 0-8 after 45 minutes.
But Cork came storming back and hit three points from Daniel Goulding, Brian Hurley and Mark Collins to reduce the margin to two after 53 minutes.
Cork got the gap down to a point with eleven minutes left but then Sean Armstrong and Michael Meehan pointed for the Tribesmen to lead by a goal going into the closing stages.
Galway goalkeeper Manus Breathnach was superb throughout and after Pearse O’Neill had hit the bottom of the left post, Cork drew level with five minutes left when Aidan Walsh fisted home a goal.
O’Neill, Goulding and Ciaran Sheehan then quickly added points for Cork and Michael Shields went forward to get an insurance point in the final minute of regular play.
That turned out to be the match-winner as Michael Meehan blasted a 14 metre free to the roof of the net in the third and final minute of stoppage time but Galway ran out of time and bowed out of the championship.
There was nothing between the sides in the opening half as they regularly exchanged points but two points from Meehan and one from Paul Conroy saw Galway lead by 0-6 to 0-5 after 21 minutes.
Goulding equalised with a free but Meehan and Armstrong responded for Galway before a Brian Hurley free left just a point between them at the break.
Goulding got the first point of the second-half to level the tie but then Galway took control and hit five in succession from Armstrong, Conroy, Meehan, Conor Doherty and Michael Martin but Cork reeled them back in to book their place in the last eight.
Cork: A Quirke; E Cadogan, M Shields (0-1), T Clancy; D Cahalane (0-1, 45), G Canty, J Loughrey (0-1); A O’Connor, P O’Neill (0-2); J O’Rourke (0-1), A Walsh (1-1), M Collins (0-1); D Goulding (0-5, 4f), C Sheehan (0-2), B Hurley (0-2f).
Subs: P Kerrigan for O’Rourke (43), P Kissane for Loughrey (47), D O’Connor for Hurley (52), P Kelly for A O’Connor (58), J O’Sullivan for Clancy (59).
Galway: M Breathnach; D O’Neill, F Hanley, J Duane; S Denvir, G O’Donnell, G Sice (0-1); P Conroy (0-2), T Flynn; J O’Brien, S Armstrong (0-4, 1f), C Doherty (0-1); M Martin (0-1), M Meehan (1-6 1-3f), D Cummins (0-1).
Subs: S Walsh for Cummins (22), M Farragher for O’Brien (52), F O Curraoin for Flynn (53), A Varley for Martin (58).
Referee: D Gough (Meath).