Ruairi Keating came off the bench with 10 minutes to go and later struck his first goal for the Gulls by converting a Daniel Sparkes pass.
The Devon side had taken a 36th-minute lead when Sparkes supplied a left-wing cross which Luke Young converted for his second goal in three games.
The National League's bottom club levelled just two minutes into the second half when Jim Stevenson's fierce strike went in off the left-hand post for his third goal of the campaign.
Torquay goalkeeper Brendan Moore made a couple of great saves in the second half and Louis Almond also went close with a header for Southport towards the end, but Keating struck at the death to push the visitors above Woking in the table on goal difference.
Match report supplied by the Press Association.
Match ends, Southport 1, Torquay United 2.
Second Half ends, Southport 1, Torquay United 2.
Substitution, Torquay United. Giancarlo Gallifuoco replaces Dan Sparkes.
Substitution, Southport. Jack Higgins replaces Ben McKenna.
Goal!  Southport 1, Torquay United 2. Ruairi Keating (Torquay United).
Substitution, Southport. Jean-Charles Coly replaces Lindon Meikle.
Damon Lathrope (Torquay United) is shown the yellow card for a bad foul.
Substitution, Torquay United. Ruairi Keating replaces Brett Williams.
Substitution, Southport. Ashley Grimes replaces Andrai Jones.
Substitution, Torquay United. Jamie Reid replaces Shaun Harrad.
Goal!  Southport 1, Torquay United 1. Jim Stevenson (Southport).
Second Half begins Southport 0, Torquay United 1.
First Half ends, Southport 0, Torquay United 1.
Goal!  Southport 0, Torquay United 1. Luke Young (Torquay United).
First Half begins.
Lineups are announced and players are warming up.
Torquay moved out of the National League relegation zone with a last-minute victory over rock-bottom Southport.