St Patrick's Athletic's title challenge suffered a massive blow on Friday night as Bray claimed their first Airtricity Premier Division home win in 10 months.
Shane O'Neill put Bray ahead in the sixth minute but the goal was cancelled out by Danny North eighth minute equaliser.
However Jake Kelly's early second half double (47 and 54) helped the Wicklow club claim their first league victory at home this season with North grabbing an injury time consolation.
After succumbing to Sligo last week at the same venue, the Seagulls made three changes with Danny O'Connor, O'Neill and Adam Mitchell replacing Stephen Brennan, Dave Webster and Dean Zambra.
After their victory over Drogheda, the visitors made two alterations to their line-up with Dave Mulcahy and Vinny Faherty swapping places with Stuart Byrne and James O'Brien.
Having conceded nine times and failed to score against the Saints in three matches this year, the Wicklow side got off to the perfect start and took a surprise sixth minute lead.
A long ball by Dempsey saw O'Neill tussle with Guthrie with the striker appearing to nudge the defender.
The ball flee kindly for the 21-year-old who burst past the ex-Galway man to coolly slot between Rogers' leg with a crisp low finish for his 13th goal in all competitions.
But their joy was short-lived as the Dubliner's levelled matters within 90 seconds.
Damian Lynch whipped over a driven cross which was met by Dave McAllister's diving header off the right flank.
Matt Gregg made a parried save but Danny North reacted between two opponents to register his first score for the Saints with a close range half volley after arriving from Alfreton Town back in June.
Chances came thick and fast after that at either end.
North grazed the bar with a 15-yard shot on the run in the 16th minute.
Wanderers twice went close with Daire Doyle sending a front post header just off target while Mulroy's snap-shot tested the side netting.
Shane O'Neill was fouled just inside the Pat's half by Conor Kenna within 90 seconds of the restart.
A bit of quick thinking by the forward saw his play the free to John Mulroy who nutmegged Shane Guthrie to break clear.
He shaped to shoot but squared across left for the in-rushing Kelly to claim his seventh league goal with a first-time placed shot past Gary Rogers.
It got even better in the 54th minute in spectacular fashion.
Ex-Saint Gary Dempsey floated over a free from the left wing.
It was headed clear only to the waiting Kelly and the winger smashed a stunning volley through a crowded area with the ball nestling in the top corner of the net.
The away side should have reduced their deficit in the 68th minute.
McAllister's dinked box in the six-yard area saw North fail to find the target with the goal at his mercy.
Referee Neil Doyle found five minute of stoppage time towards the end.
And the former pacesetters pulled one back in the 95th minute.
A low shot rebounded kindly to North who smashed to the net from 10-yards with a shot on the turn.
With Drogheda United losing to Shamrock Rovers, Bray are now just five points behind their relegation rivals with a game in hand.