Jake Lawlor headed the home side in front after 13 minutes, but out of the blue Torquay turned the match on its head in under two minutes.
First Sean McGinty headed in Luke Young's corner, and seconds later Jamie Reid threaded a ball through for Ruairi Keating to plant home.
Both sides missed further chances to add to the score, before Guiseley staged late drama.
Kevan Hurst struck with four minutes left before a frenetic goalmouth scramble led to Guiseley's winner, with the identity of the goalscorer unclear.
Match report supplied by the Press Association.
Guiseley turned impending defeat into victory against Torquay at Nethermoor Park with two late goals.