Kilkenny City won for the first time in 15 games - and gave manager Joe McGrath his first win since taking charge 12 games ago - to book their passage through to the third round at their only happy hunting ground of Terryland Park.
In a scrappy first half, the game only came to life when Kilkenny, bottom of the Premier Division and whose only other win this season was on this ground in August, took the lead on 38 minutes.
The skilful Carlos Rocha, earlier booked for diving, dribbled through the heart of the home defence to lay the ball inside the full back for Warren Parkes, who shot low beyond David Forde from a tight angle.
A disjointed and shapeless Galway, semi-finalists the previous two years, pressed hard for an equaliser for much of the second half only to be caught on the counter-attack a minute from time.
Derek McGrath got forward to split the Galway defence and play Paul McAreavey in to sidefoot past Forde.
Galway United: Forde; Crossley, Clery, O'Connor, Morgan (Fortune 57 mins); Ryan, Murphy, Sheridan, O'Brien (B Moran 82 mins); Lavine, Grant (Keogh 66 mins).
Kilkenny City: Nelson; Purdy (Brennan 16 mins), Wilkinson, Mulcahy, Brunton; O'Neill, Johnson, McGrath, McAreavey; Parkes (Carolan 80 mins), Rocha. Referee: A O'Regan (Cork).