Second half goals from Declan O'Brien and Ryan Guy boosted St Patrick's hopes of avoiding the relegation play-offs in an eventful basement battle at United Park.
The Inchicore men looked destined for a nervous final-day showdown with Shamrock Rovers when they fell behind to an early James Chambers strike.
But they turned it round in a five-minute spell just after the restart, and Chambers went from hero to villain when he was sent off for a challenge on Ryan Guy right on the final whistle.
|11||Galway United FC||16||14|
|12||St. Patrick's Athletic||16||14|