The Minstermen started like a side full of confidence and they opened the scoring through Will Hayhurst after 10 minutes with his 18-yard strike finding the top corner via a deflection off Aaron Downes.
Torquay had barely threatened in the half but they almost levelled the scores 10 minutes before the interval with Enoch Showunmi's header from Billy Bodin's delivery almost dropping in at the far post.
The visitors were to go even closer on the stroke of half time with Lee Mansell seeing his low free-kick pushed around the post by Nick Pope.
The Gulls may have finished the first half the stronger of the sides, but it was York who almost scored the crucial second goal with Martin Rice palming away Adam Reed's powerful angled drive.
Chances were at a premium for both sides in the closing stages with Downes nearly levelling the scores with a header.