Shepherd Murombedzi's late goal secured Torquay United's place in the FA Trophy fifth round at the expense of Wrexham.
Substitute Murombedzi slotted the ball past Rhys Taylor and consign Wrexham to a fifth successive defeat.
Andre Wright had shot wide from six yards for Torquay during a first half which the home side controlled.
Wrexham had beaten Torquay United in last season's FA Trophy semi-finals before losing to North Ferriby in the final.
Wrexham manager Gary Mills told BBC Radio Wales: "I thought we played ok on a difficult surface.
"In the second half I thought we played well and looked the more likely to score but obviously disappointed with the goal.
"We're out of the Trophy, which is disappointing, but not only that it's another loss."