The Dons looked to be heading for a fourth straight defeat in all competitions after Jake Hyde headed the home side in front after 64 minutes.
Luke Moore wasted a great chance to level with 15 minutes to go but Long's strike from outside the box deflected past goalkeeper Graham Stack in the 84th minute to earn Neal Ardley's side a point.
Ricky Holmes almost opened the scoring inside the first minute only for visiting keeper Neil Sullivan to tip his curling shot over the crossbar at full stretch.
The Dons' best first-half chance came after 31 minutes with Curtis Osano beating three defenders and crossing only for his dangerous ball to be cleared off the line.
Barnet took the lead after 63 minutes when Hyde escaped his marker to head in Mark Byrne's corner before Moore, seeking an equaliser, fired into the side netting.
But just when it looked like Barnet would hold on, Long's 20-yard strike took a wicked deflection and found its way into the back of the net.