Torquay moved out of the League Two relegation zone at the expense of Barnet in a tense clash at Plainmoor.
Elliot Benyon headed the Gulls into the lead after Brian Saah had flicked on Kevin Nicholson's free-kick.
Barnet equalised when Jake Hyde beat the offside trap to head home with his first touch before Billy Bodin lashed in a strike from the edge of the box.
Saah headed home from a narrow angle for Torquay before Hyde set up a tense finish with his second.
Bodin could have helped Torquay to double their lead in the first half but his pass to Benyon was a poor one when the pair were two-on-one with the Barnet defence.
The Bees felt they should have had a penalty early in the second half when Andy Yiadom's shot appeared to hit Saah on the arm but referee Andy Woolmer did not give it.
The result means Barnet slip into the relegation places, one point behind Torquay, York and Wimbledon, with two games to go.