Bray looked on target for a sixth victory in seven league games over a Bohemians side down to 10 men when defender Kevin Feely was sent off for a clumsy tackle after just five minutes.
The resulting free from just outside the box was dispatched into the roof of the net by Ledwith.
It got better for College on 22 minutes when Paul O’Conor picked up a loose ball in midfield and let fly with a speculative shot from 40 yards that took a deflection off David McMillan to wrong foot keeper Murphy.
On a rare Bohemians breakaway, Ryan McEvoy shot over from 20 yards.
Then Derek Pender headed over from six yards as the visitors rallied.
Then Pender played a clever ball into Mucahy only for the midfielder to slide the ball wide of the right hand post.
Bohemians then mounted that dramatic late revival when first Dave Scully fired home from 20 yards after Pender had created the opening on 90 minutes.
And Scully was again the hero when heading home in the third minute of added time.
UCD: Barron; Douglas (Russell 80), Leahy, D.O’Connor, Nangle; Clarke (Mulhall 71), O’Conor, McCabe (Kavanagh 58), Ledwith; D.McMillan, Benson.
BOHEMIANS:Murphy; Heary, Feely, Lopez; Barker , McEvoy, Mulcahy, J.O’Connor (Pender 28), Moore (Corcoran 65) 5; E.McMillan, Devenney (Scully 65).
Referee S.Grant (Dublin).
A brilliant save from Darren Quigley edged Bray a point closer to safety from a lively scoreless draw at Tolka Park.
Shelbourne midfielder Glenn Cronin picked out the run of Paddy Kavanagh who jinked through a couple challenges to rifle in a left foot drive that Quigley batted away for a corner.
That came ten minutes into the second half with Quigley having his fingers stung again from Kavanagh’s low shot minutes later after Bray skipper Danny O’Connor’s clearing header from David Cassidy’s corner dropped to him just outside the area.
Kavanagh had another sniff from Cassidy’s quickly taken corner on 70 minutes. His quick feet made some room but the shot was into the side netting.
Paul Byrne did have the ball in the Bray net on 70 minutes but it was ruled out for an offside.
Kieran Marty Waters finally came alive for Bray two minutes later to register their first real effort on goal in the second half, his blistering half volley whizzing just over.
Substitute Daire Doyle then wasted Bray’s best chance of when somehow shooting over the top from Waters’ low cross on 83 minutes.
Jason Byrne forced the ball into the Shels net two minutes after but it wasn’t allowed due to a push on Ian Ryan.
The once again impressive Kavanagh almost won it for Shels three minutes into added time but his fierce drive was just over the bar.
SHELBOURNE: Bennion; Ryan, Boyle, Shortall, S. Byrne; Kavanagh, Cronin, Dawson, Clancy (C. Byrne, 67 mins.); Cassidy; P. Byrne (Gorman, 86 mins.).
BRAY WANDERERS: Quigley; Webster, D. O’Connor, Mitchell, Massey; K. O’Connor, Zambra; Mulroy (Doyle, 79 mins.), Houston (Hanlon, 69 mins.), Waters (Marshall, 90 mins.); Byrne.
Referee: Paul McLaughlin (Monaghan).