Former Wrexham goalkeeper Kevin Dearden was Torquay's hero after a brilliant display against his old club.
Veteran Dearden, 34, pulled off a series of outstanding saves in both halves, but it was after the interval that he broke Wrexham's heart.
Right winger Tony Bedeau's first-half goal settled an increasingly scrappy contest and lifted Torquay out of the relegation zone for the first time this season.
Bedeau cut in on a perfect through-ball by midfielder Alex Russell and tucked a cool, low shot past advancing Wrexham goalkeeper Matt Baker.
Russell was the architect of a series of incisive moves as Torquay threatened to put the match beyond crisis club Wrexham before half-time.
He finished one end-to-end six-man move with a magnificent cross which Martin Gritton headed over with only Baker to beat from six yards.
Wrexham's dangerman was Spanish striker Juan Ugarte, making his first start for the Red Dragons.
But Dearden, who tipped one Chris Llewellyn volley round his post in the first half, denied Ugarte with a full-length low save just after the restart and from then on it was Dearden against the rest.
Apart from one break, when substitute Bayo Akinfenwa hit the post on a Russell through-ball in the 71st minute, Wrexham piled on the pressure without being able to crack Dearden and his stubborn defence.
Even when Hector Sam went on in the closing stages, he found Dearden in inspired form.
It was Wrexham's fourth successive league defeat and saw Torquay climb above them on goal difference.