Jake Hyde scored an 88th minute winner to give Barnet a 1-2 win away at Gateshead.
Colin Larkin opened the scoring for the home side after 32 minutes but their lead lasted just five minutes as Keanu Marsh-Brown slotted home.
The matched looked like it was going to end level but Hyde took centre stage with just two minutes remaining as he volleyed the unbeaten Bees to second in the Skrill Premier table.
The Bees had the better of the opening stages with Hyde and Marsh-Brown both being penalised for offside as the away side continued to press.
With 14 minutes played they had their first shot on goal as Hyde saw his effort comfortably saved by Adam Bartlett.
Eight minutes later they had another effort, this time from Mark Byrne, but they were again denied by Bartlett who palmed the ball to safety.
The Bees were the better side in the opening half hour but on 32 minutes they fell behind as Larkin tapped the ball home from close-range.
But the home side’s lead lasted just six minutes as Curtis Weston sent Marsh-Brown on his way and he raced clear to slot the ball into the back of the net.
The latter stages of the half were dominated by Edgar Davids’ side with Weston and Roberto Casabella seeing their shots come to nothing.
After the break the match continued in the same vein but the Bees were unable to make it count despite the persistence of Marsh-Brown.
Hyde, who also threatened, did have the ball in the net midway through the half but it was ruled out for offside.
Byrne and Marsh-Brown both shot wide before Harry Crawford and Marciano Mengerink were introduced in the latter stages but Hyde was the hero as he secured the win just two minutes from time.