Ryan Jarvis's excellent individual goal moved Torquay five points clear of the League Two relegation places after beating York at Plainmoor.
Elliot Benyon opened the scoring when he reacted first from close range after Lee Mansell's corner was not cleared.
Jarvis then stole the show as he ran 50 yards before blasting in right-footed from 20 yards out.
Richard Cresswell's penalty set up a nervous finish after Tom Cruise was sent off for a foul on Josh Carson.
The loss leaves York deep in trouble at the bottom of League Two as they occupy the second relegation spot, one point clear of bottom side Aldershot.
VIEWS FROM THE DRESSING ROOM
Torquay United manager Alan Knill told BBC Radio Devon:
"It is all about the points; it was frantic at the end but it was great that we took them. It's been a great week for us.
"I didn't think we played great, but you do enough to win the game and that's all it's about. You don't want to know what I said at half-time, I wasn't happy about the performance"
"The referee had no choice about the red card, it was bad play by us."
"[It was] Fantastic again by the players, they just dug in to see out the game. What this week does, it just enhances the belief that we can compete with anybody in the league."
York City manager Nigel Worthington told BBC Radio York:
"The game is 90 minutes long, it's not 20, and you cannot give the opposition a two-goal start because its tough going getting back into it, but I think they showed a lot of spirit.
"They passed the ball a lot better today than what we have done, which I was very pleased with, but we need more conviction around the opposition's goal.
"I probably think that maybe a little of the self-belief and the confidence is being jolted a little, so it's just about being brave and taking the responsibility on and making it happen."
Torquay 01 Poke Booked 02 Oastler 05 Saah 16 MacDonald Booked 21 Cruise Dismissed 07 Mansell 24 Labadie 25 Chapell (Bodin - 85' ) 08 Jarvis 09 Howe 26 Benyon (Nicholson - 74' ) Substitutes 13 Rice 03 Nicholson 04 Downes 06 Lathrope 15 Bodin 20 Craig 14 Macklin York 24 Ingham 04 Smith 05 McGurk Booked 06 Parslow 14 Carson 22 O'Connell 17 Blair 26 McLaughlin (Platt - 46' ) 29 McGrath 10 Chambers 35 Cresswell Booked Substitutes 01 Jameson 16 Fyfield 13 McDaid 18 Platt 07 Reed 09 Walker