Stuart Holt completed a remarkable Longford comeback with a 77th minute winner direct from a corner to lift Town out of the relegation zone.
But Eric Lavine was the real Town hero with a brace of goals to get them
back into the match after their trailed 2-0 after 32 minutes.
Lavine headed in Alan Kirby's cross to give Town hope two minutes before
the break and then punished sloppy defending to level from Holt's 64th minute
free kick.
Stephen Fox gave Bray a dream start when his volley caught Stephen O'Brien
cold to dip in over the keeper's head after just two minutes.
Paul Keegan then appeared to put Bray in command when heading home Colm
Tresson's deep cross from the right on 32 minutes.
Full-time: Longford Town 3 Bray Wanderers 2