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."
Live Text Commentary
Full Time The match has reached full-time.90:00 +4:33 Booking
Booking Graham Stack is cautioned by the ref for unsporting behaviour.90:00 +3:06
Foul by Andy Iro on Callum Davies, free kick awarded. Joe Martin fires a strike on goal direct from the free kick.90:00 +2:35
The ball is swung over by Joe Martin, clearance by Curtis Weston.90:00 +2:14
Inswinging corner taken from the right by-line by Joe Martin, Graham Stack makes a comfortable save.90:00 +1:45
Free kick awarded for an unfair challenge on Myles Weston by Edgar Davids. Free kick crossed right-footed by Charlie Allen from left wing, John Oster makes a clearance.90:00 +1:17
Corner taken by Joe Martin from the right by-line played to the near post.90:00 +0:22
Inswinging corner taken from the right by-line by Joe Martin, Mark Byrne makes a clearance.89:47
Jack Payne produces a cross, clearance by Mark Byrne.88:30
Stuart Nelson takes the free kick.88:30 Booking
Booking Curtis Weston booked.88:21
Deon Burton fouled by Mark Byrne, the ref awards a free kick.85:16
Andy Iro fouled by Adam Birchall, the ref awards a free kick. Graham Stack takes the free kick.83:02 Substitution
Substitution Curtis Weston on for Ricky Holmes.82:28
Inswinging corner taken from the right by-line by Joe Martin, clearance made by John Oster.81:54
Corner taken left-footed by Charlie Allen from the right by-line, Deon Burton takes a shot. Graham Stack makes a save.81:38
Shot from 12 yards by Joe Martin. Fantastic save by Graham Stack.80:55
The ball is crossed by Joe Martin, Edgar Davids makes a clearance.80:17
Effort from the edge of the box by Andrew Yiadom goes wide of the left-hand upright.79:43
Edgar Davids fouled by Chris Whelpdale, the ref awards a free kick. John Oster takes the free kick.
Andrew Yiadom takes the direct free kick.77:38 Booking
Booking The referee shows Chris Whelpdale a yellow card for unsporting behaviour.77:21
Chris Whelpdale concedes a free kick for a foul on Ricky Holmes.76:51
Unfair challenge on Callum Davies by Ricky Holmes results in a free kick. Matt Fish takes the direct free kick.76:31
Adam Barrett gives away a free kick for an unfair challenge on Jake Hyde. John Oster takes the free kick.73:05
The ball is sent over by Myles Weston, clearance by Andy Iro.72:12
Matt Fish produces a cross, comfortable save by Graham Stack.70:51
Free kick awarded for a foul by Charlie Allen on Edgar Davids. John Oster takes the free kick.70:08
Matt Fish crosses the ball.69:36
Corner taken by Charlie Allen from the left by-line, David Stephens manages to make a clearance.68:53
Foul by Andy Iro on Deon Burton, free kick awarded. Free kick crossed by Charlie Allen, clearance made by Andy Iro.66:48
Adam Birchall takes a shot. Save made by Graham Stack.64:58
Charlie Allen takes a shot from 12 yards. Save made by Graham Stack.63:30
Effort on goal by Joe Martin from inside the box misses to the right of the target.63:05
Corner taken by Joe Martin from the right by-line.58:42 Substitution
Substitution Chris Whelpdale replaces Charlie Lee.58:42 Substitution
Substitution Lewis Montrose leaves the field to be replaced by Jack Payne.58:42 Substitution
Substitution Adam Birchall joins the action as a substitute, replacing Romain Vincelot.57:43
Romain Vincelot gives away a free kick for an unfair challenge on Mark Byrne. John Oster takes the direct free kick.57:32
Ricky Holmes sends in a cross, clearance by Adam Barrett.57:02
Shot by Edgar Davids. Save by Stuart Nelson.55:56
The assistant referee signals for offside against Deon Burton. David Stephens restarts play with the free kick.54:14
Shot from 25 yards from Barry Fuller. Save by Stuart Nelson.52:24
Headed effort from deep inside the penalty area by David Stephens goes harmlessly over the crossbar.51:38
Corner taken right-footed by John Oster, Adam Barrett manages to make a clearance.51:29
John Oster crosses the ball, clearance by Callum Davies.48:43
The referee blows for offside against Myles Weston. Graham Stack restarts play with the free kick.45:08
Unfair challenge on Deon Burton by David Stephens results in a free kick. Charlie Allen crosses the ball from the free kick right-footed from left channel.45:01
The game restarts for the second half.45:00 +1:06 Half time
Half Time It is the end of the first-half.38:12
The official flags Jake Hyde offside. Stuart Nelson takes the free kick.36:50
Ricky Holmes takes a shot from deep inside the box clearing the bar.35:48
Corner taken right-footed by John Oster, clearance by Callum Davies.35:09
Adam Barrett concedes a free kick for a foul on Andrew Yiadom. John Oster fires a strike on goal direct from the free kick, save made by Stuart Nelson.34:48
Matt Fish takes a shot. Andy Iro gets a block in.33:21
Unfair challenge on Charlie Allen by Mark Byrne results in a free kick. Charlie Allen takes the direct free kick.30:54
Myles Weston crosses the ball.27:18
Centre by Joe Martin, Jake Hyde makes a clearance.26:46
Outswinging corner taken by Charlie Allen from the right by-line played to the near post.26:12
Matt Fish takes a shot. Save by Graham Stack.25:02
Edgar Davids fouled by Deon Burton, the ref awards a free kick. Direct free kick taken by Graham Stack.22:45
Foul by Elliot Johnson on Matt Fish, free kick awarded. Free kick crossed left-footed by Joe Martin, Barry Fuller makes a clearance.22:19
Edgar Davids is adjudged to have handled the ball. Direct free kick taken by Matt Fish.18:40
Assist by Mark Byrne.18:40 Goal scored
Goal! - Jake Hyde - Gillingham 0 - 1 Barnet Jake Hyde grabs a goal from outside the area to the top right corner of the goal. Gillingham 0-1 Barnet.15:14
Ricky Holmes has an effort at goal. Save made by Stuart Nelson.13:08
Edgar Davids takes a shot. Comfortable save by Stuart Nelson.12:01
Romain Vincelot gives away a free kick for an unfair challenge on John Oster. Direct free kick taken by Graham Stack.10:42
Edgar Davids challenges Callum Davies unfairly and gives away a free kick. Direct free kick taken by Callum Davies.9:40
Charlie Allen concedes a free kick for a foul on Mark Byrne. Free kick taken by Andy Iro.6:58
Charlie Lee fouled by Edgar Davids, the ref awards a free kick. Joe Martin has a direct shot on goal from the free kick, comfortable save by Graham Stack.1:34
Shot from long distance by Charlie Allen misses to the right of the target.0:43
The official flags Myles Weston offside. Graham Stack restarts play with the free kick.0:00
The referee gets the game started.
Live data and text provided by our data suppliers