Cork climbed back up to fourth in the Premier Division table as they ended Bray's five-game home winning streak.
A hamstring injury ruled out Chris O'Connor, which prompted the Seagulls into the emergency signing of veteran Alan Gough.
With the Wicklow side having won their previous five matches in all competitions 1-0 at the Carlisle Grounds, the 36-year-old was picking the ball out of his net after just 74 seconds.
After a corner was cleared, Darren Murphy's overhead pass released John O'Flynn along the right wing. His low delivery picked out the unmarked George O'Callaghan at the far post to finish high into the roof of the net.
The Leesiders then scored twice in four minutes just after the half hour to seal only their second top flight away win of the season.
From Pat Sullivan's long through ball, Dave Mooney beat the Wanderers offside and lobbed a stranded Gough from fully 30-yards into an empty net.
Then O'Callaghan played in O'Flynn in the 34th minute. The striker's low half volley hit the outside of the far post with skipper Dan Murray having a simple four-yard tap in.
Gough also thwarted Mooney in a one-on-one situation after 18 minutes.
Michael Devine was required to make a good 24th minute block after April player of the month Paddy Kavanagh out-muscled Neal Horgan.
The City custodian came to their rescue on the hour, getting down low to his right to narrow the angle after Kavanagh raced through off Murray's mistake.
Eight minutes later, he produced another finger-tip save to keep out Emeka Onwubiko's drive after good work by Alan Cawley.
Cork should have notched a fourth in the 71st minute. After being set-up by O'Callaghan, O'Flynn's angled effort hit the foot of the far post.
With an open goal, Liam Kearney stumbled and fluffed the rebound.
Bray Wanderers: Gough; Pender, Doherty (Kenny 56 mins), Foran, Cronin; Whelan (Onwubiko half time), Cawley, Tresson, Duggan; Kavanagh, Rowe.
Cork City: Devine; Horgan, Murray, Sullivan, Danny Murphy, Darren Murphy, Healy, O'Callaghan; Kearney (Ryan 90 mins), Mooney (Behan 79 mins); O'Flynn (O'Connor 89 mins).
Referee: Damien Hancock (Dublin).