Local boy Neil Roberts came off the bench to score a 79th-minute winner against relegated Torquay which keeps alive Wrexham's League Two survival hopes.
Still recovering from injury, Roberts came on in the 61st minute and was at the near post to tuck home a Simon Spender low cross past the superb keeper Simon Rayner.
The Gulls, already doomed to non-league football next season, played some neat football at times but had to rely on first-half efforts from Matt Hockley and Stephen Cooke which Anthony Williams in the Dragons goal dealt with.
It was United's giant-sized keeper Rayner who stole the honours, particularly in the first half, when he denied Lee McEvilly the 14th minute and pushed a Danny Williams header around the post in the 28th. Six minutes later he somehow then kept out a Michael Proctor shot which finally looked like breaking the deadlock.
Wrexham were understandably edgy at times and, although Jeff Whitley and Danny Williams dominated the midfield, Wrexham were hitting too many high balls in the Gulls box which Rayner and the lanky Steve Woods gobbled up repeatedly, much to the annoyance of the anxious Dragons fans.
Cut rate admission prices brought 6000 fans in for the game which Wrexham needed to win to keep close to Boston, who themselves travel to the Racecourse Ground on the last Saturday of the season in what could prove to be a winner takes all in the League Two survival stakes.
In the second half, McEvilly shot straight at Rayner and, when Whitley hit the crossbar, it looked as though the Dragons were not going to get the crucial three points they needed to keep their survival hopes alive. However a magical move involving Chris Llewellyn and Simon Spender helped provide Roberts with the chance to become the hero.