Elliot Benyon put the home side in front after 25 minutes, powering home a close-range header after a free-kick from Kevin Nicholson.
Fit-again keeper Michael Poke kept Torquay in the game with a terrific double save to deny first Andy Yiadom and then Harry Crawford.
Top scorer Jake Hyde came on for Barnet after 58 minutes and marked his arrival by equalising with his first touch, heading in unmarked at the far post after a free kick as the Torquay defence rushed out for offside.
But Torquay were in front again two minutes later when Billy Bodin drove a low left-foot shot past Barnet keeper Graham Stack from the edge of the box.
Defender Brian Saah made it 3-1 with 20 minutes to go with a looping header from a corner, but Hyde kept the pressure on Torquay with a volleyed goal after 77 minutes.