Barnet aided their hopes of survival by coming from behind to beat York.
The Minstermen broke the deadlock in the seventh minute when Michael Rankine flicked in John McGrath's free-kick.
Keeper Graham Stack then saved smartly to prevent Matty Blair from doubling the hosts' advantage, before Andy Yiadom poked home the equaliser.
And the visitors completed the comeback - which moves them two points clear of the drop zone - when substitute Jake Hyde fired low past Michael Ingham.
VIEW FROM THE DRESSING ROOM
York City manager Gary Mills told BBC Radio York:
"It's a blow. It's another game we've lost.
"We're not winning football matches, it's another team below us that have just gone and beat us so it's a big blow.
"We've been giving goals away for quite a few games now for quite a few weeks.
"We haven't scored in abundance, we know that's a problem as well. But if you're going to concede like goals like we're conceding at this moment in time, it's just going to make it very very difficult."
Live Text Commentary
Full Time The referee blows for the end of the match.90:00 +6:07
Ben Everson delivers the ball, Header from deep inside the penalty area by Chris Smith goes harmlessly over the crossbar.90:00 +5:08
Foul by Jamal Fyfield on Mark Byrne, free kick awarded. Direct free kick taken by Graham Stack.90:00 +4:11
Curtis Obeng sends in a cross, save by Barry Fuller.90:00 +3:23 Booking
Booking Graham Stack receives a yellow card.90:00 +2:51
Chris Smith takes a shot.89:09
Corner taken by John McGrath from the right by-line played to the near post, save made by Graham Stack.86:14
The official flags Andrew Yiadom offside. Michael Ingham takes the indirect free kick.85:25
Inswinging corner taken right-footed by Jason Walker from the left by-line, Elliot Johnson manages to make a clearance.84:09
Short corner worked by Alex Rodman.83:00
Right-footed shot by Curtis Obeng missed to the right of the net.79:38 Substitution
Substitution Bondz N'Gala is brought on as a substitute for Chiro N'Toko.79:02
Corner taken by John McGrath.78:09
Direct free kick taken by Jason Walker.78:09 Substitution
Substitution Scott Kerr goes off and Ben Everson comes on.78:09
Unfair challenge on Jason Walker by David Stephens results in a free kick.75:25
Free kick awarded for a foul by Mark Byrne on Jason Walker. Strike on goal comes in from John McGrath from the free kick.72:38 Goal scored
Goal! - Jake Hyde - York 1 - 2 Barnet Jake Hyde scores a goal from just outside the penalty box to the bottom left corner of the goal. York 1-2 Barnet.70:58
Unfair challenge on Mark Byrne by Curtis Obeng results in a free kick. The free kick is swung in right-footed by John Oster, clearance made by Chris Smith.70:31
Corner taken by Jason Walker from the left by-line, save made by Graham Stack.
Inswinging corner taken left-footed by John McGrath from the right by-line, Barry Fuller manages to make a clearance.68:25 Substitution
Substitution Jason Walker on for Michael Rankine.67:08
Corner taken by John McGrath from the right by-line to the near post, clearance made by Jake Hyde.65:38
Free kick awarded for an unfair challenge on Jamal Fyfield by Mark Byrne. Jack O'Connell restarts play with the free kick.65:14 Substitution
Substitution (Barnet) makes a substitution, with Jake Hyde coming on for Craig Beattie.64:15
Curtis Obeng is flagged offside by the assistant referee. Indirect free kick taken by Graham Stack.62:50
Shot by Curtis Obeng. Graham Stack makes a fantastic save.61:07
Matty Blair is ruled offside. Graham Stack takes the indirect free kick.58:34
Corner taken by Alex Rodman, clearance made by John Oster.57:38
Outswinging corner taken right-footed by John Oster from the right by-line to the near post, clearance by Jamal Fyfield.55:27
Edgar Davids takes the direct free kick.55:27 Substitution
Substitution Alex Rodman on for Ashley Chambers.55:27
Daniel Parslow challenges Andrew Yiadom unfairly and gives away a free kick.54:11
Michael Rankine gives away a free kick for an unfair challenge on Chiro N'Toko. Graham Stack takes the direct free kick.53:14
Effort from the edge of the box by Jonathan Nurse goes wide of the left-hand post.52:43
The assistant referee flags for offside against Michael Rankine. Graham Stack takes the free kick.49:24
Michael Rankine fouled by Barry Fuller, the ref awards a free kick. John McGrath restarts play with the free kick.48:24
Ashley Chambers challenges Andrew Yiadom unfairly and gives away a free kick. John Oster takes the free kick.45:01
The referee blows his whistle to start the second half.45:01 Substitution
Substitution Jordan Brown leaves the field to be replaced by Elliot Johnson.45:00 +1:31 Half time
Half Time The players leave the pitch at half time.45:00 +0:42
Corner taken by John Oster played to the near post, Header from close in by Andrew Yiadom misses to the right of the goal.42:44
Corner taken by John Oster from the right by-line played to the near post, Jamal Fyfield manages to make a clearance.40:25
Corner from right by-line taken by John McGrath.39:09
Free kick awarded for an unfair challenge on Curtis Obeng by John Oster. Jamal Fyfield takes the free kick.38:07
Mark Byrne challenges Scott Kerr unfairly and gives away a free kick. Free kick taken by John McGrath.30:58
Ashley Chambers is penalised for a handball. Free kick taken by Graham Stack.28:56
Free kick awarded for a foul by Ashley Chambers on Barry Fuller. Graham Stack takes the free kick.24:30
Chris Smith concedes a free kick for a foul on Edgar Davids. John Oster takes the free kick,24:54
Assist on the goal came from John Oster.24:54 Goal scored
Goal! - Andrew Yiadom - York 1 - 1 Barnet Andrew Yiadom scores a goal from inside the six-yard box to the bottom left corner of the goal. York 1-1 Barnet.23:38
Inswinging corner taken by John McGrath.20:54
Matty Blair concedes a free kick for a foul on Chiro N'Toko. Free kick taken by Edgar Davids.20:12
Jordan Brown sends in a cross, Craig Beattie takes a shot. Save by Michael Ingham.18:13
Matty Blair has an effort at goal from 12 yards. Save by Graham Stack.11:56
The ball is swung over by Curtis Obeng, Graham Stack makes a save.8:41
John Oster takes a outswinging corner from the right by-line to the near post, clearance by Daniel Parslow.6:53
John McGrath provided the assist for the goal.6:53 Goal scored
Goal! - Michael Rankine - York 1 - 0 Barnet Michael Rankine fires in a goal from close range to the bottom right corner of the goal. York 1-0 Barnet.6:08
Edgar Davids gives away a free kick for an unfair challenge on Michael Rankine. A cross is delivered by John McGrath,3:10
Mark Byrne challenges Scott Kerr unfairly and gives away a free kick. John McGrath restarts play with the free kick.1:34
Inswinging corner taken right-footed by Ashley Chambers, save by Graham Stack.1:03
Corner taken by Ashley Chambers from the left by-line to the near post, David Stephens makes a clearance.0:25
Corner from the right by-line taken by John McGrath, save made by Graham Stack.0:00
The referee gets the game underway.
Live data and text provided by our data suppliers