The visitors, who sit 95 places below their opponents in the football tree, had taken a surprise 73rd-minute lead through midfielder Mark Carrington exactly 23 years to the day that the Welsh side had stunned Arsenal at the same stage of the competition.
However, the Premier League team then responded in style to that shock by scoring three times in the final 10 minutes, firstly through winger Marko Arnautovic, before substitute Stephen Ireland then added a late brace to see the home team safely through to the fourth round.
In the opening 45 minutes, though, the Welsh outfit more than held their own against the Potters, without ever really testing the hosts’ back-up goalkeeper Jack Butland.
Equally, though, Jonathan Flatt in the Wrexham goal was not called upon that often, with the closest that Stoke came to opening the scoring coming via a wayward back header from Blaine Hudson that very nearly beat the minnows’ shot stopper.
It was Wrexham who did make the first breakthrough, however, with just 17 minutes remaining as Carrington met Connor Jennings’s centre with a low header past Butland to send 5,000 visiting fans into a state of delirium.
And at that stage of proceedings, the Conference Premier League side were fully deserving of their lead, although Wrexham were only able to hold on to their slender advantage for just seven minutes before Mark Hughes’s men drew level.
The Welshman’s response to falling behind was to immediately introduce Peter Crouch in an attempt to unsettle the Wrexham back four.
And the switch paid almost immediate dividends as the lanky striker’s close-range effort was turned straight into Arnautovic’s path by the unlucky Flatt, with the Austria international tapping in from close range.
From that point on, there was only ever one winner, although Stoke did not take the lead for the first time in the match until there were just two minutes remaining, and again it was another second-half substitute who made the difference.
Midfielder Stephen Ireland had only been on the field of play for a little more than 10 minutes when he collected Crouch’s neat knock down in the penalty area, before the Irishman fired an effort into the bottom left-hand corner of the Wrexham net.
And then with virtually the last kick of the game, Ireland was again on hand to place a low shot past a helpless Flatt to confirm the Potters’ safe passage through to the FA Cup fourth round.