Jake Hyde's first-half goal secured Barnet's second away win of the season as the Bees saw off League Two leaders Gillingham at Priestfield Stadium.
Hyde scored the only goal of the game on 19 minutes with a powerful strike from just outside the area.
John Oster also went close for Barnet with a free-kick while Joe Martin stopped Andy Yiadom from tapping in.
Adam Birchall went close for the Gills late on but his attempt was well saved by Bees keeper Graham Stack.
Martin Allen's side have now picked up one point out of a possible last nine on home soil.
Although they remain top of League Two, they have won just once in their last six games.
VIEW FROM THE DRESSING ROOM
Gillingham manager Martin Allen tells BBC Radio Kent:
"It was a disappointing first half but we really stepped up in the second half.
"They do play some good football and it's difficult when you're chasing a team with the extra player in the midfield.
"There's room for improvement but it doesn't worry me. You want the performances to be good.
"As a team, we did better in the second half but I thought the changes improved the team for sure."
Sorry, we were unable to load match stats, please try again.