Pearl Slattery netted a dramatic winner in the ninth minute of added time as Shelbourne just about held onto a share of top spot in the Women's National League.
The Reds had fought back from an early concession but looked set to fall behind champions Peamount United as an unusually lengthy added period ticked towards a conclusion.
Bohs, who played the final 20 minutes with ten players after Hannah Tobin Jones was sent off for a second yellow, failed to clear a ball into the box and the captain reacted quickest to stab home.
It brought to an end a thrilling game in which Bohs played above their lowly position in the table and could easily have taken all three points themselves.
The visitors led as early as the sixth minute as a Chloe Darby cross was bundled into the net by Lisa Murphy with a combination of her head and chest.
Shels controlled possession for much of the half but posed relatively little threat, though Courtney Maguire did pull off a world-class save to tip Noelle Murray's shot onto the bar.
The home side got a fortuitous equaliser just before the break as Jessie Stapleton's shot was blocked into the path of Saoirse Noonan to roll the ball home.
Shels, who lost Keeva Keenan to a serious-looking injury, took the lead midway through the second half as Stapleton tucked the ball nicely home.
Bohs levelled immediately, however, through a fine Darby strike, but they soon went a player down as Tobin Jones saw red for two yellows in four minutes.
Still, they looked to have done enough until, with the clock ticking deep into injury time, Slattery found the winning touch.
Shelbourne: Amanda Budden; Jess Gargan, Jessie Stapleton, Pearl Slattery, Rachel Graham (Jessica Ziu 81); Jamie Finn, Ciara Grant, Noelle Murray; Keeva Keenan (Mia Dodd 44 (Alex Kavanagh 90+4)), Emily Whelan, Saoirse Noonan.
Bohemians: Courtney Maguire; Bronagh Kane (Hannah Tobin Jones 35), Yvonne Hardigan, Isobel Finnegan, Annmarie Byrne; Ally Cahill, Sophie Watters (Niamh Kenna 90+2), Chloe Darby; Abbie Brophy, Lisa Murphy (Georgia Monks 50), Erica Burke.
Elsewhere, Cork City leapfrogged Treaty United in the table with a 2-1 victory on the road.
The visitors took the lead in the third minute through Leah Murphy's header but that was cancelled out by Jenna Slattery's super strike just 12 minutes later.
However, a 53rd-minute penalty by Nathalie O'Brien proved to be the winning goal.