Two goals in two minutes shot the Swans into the last 16 of the FA Cup after Preston had dominated for most of the match.
When Dickson Etuhu headed the Nationwide Division One outfit in front in the 59th minute it looked all over for the Welshmen but a blistering free kick from Andy Robinson ten minutes from time and a 19th goal of the season for Lee Trundle two minutes later sent the capacity crowd wild with delight.
Swansea boss Brian Flynn was delighted with the win and with the performance of his side.
"What we have worked for all week was to try and put on a cracking FA Cup performance for the fans and we have done that today and even added a fairytale ending.
"I said to the players at half time that we were still in the game and should go for it by trying to make chances and thankfully that is what happened.
"There were a number of good saves from both keepers but it has turned out to be a day to remember.
"A year ago Andy Robinson was playing Sunday League football but today he played in front of 10,000 passionate fans and gave us something special with that superb free-kick.
"Preston are a good side but the response from the players after they went a goal down was magnificent.
Preston manager, Craig Brown, was understandably disappointed that his side had failed to make the game safe after dominating for so long.
"We played confidently for 80 minutes but should have wrapped the game up much earlier and we had a great chance to make it 2-0 and put the result beyond doubt," he said.
"The fightback from Swansea was not unexpected and we should have defended much better.
"We have won at difficult places this year and I thought even at 1-1 we could have defended well enough to earn a replay.
"The determination we have shown while battling for points in the League just was not shown in those final few minutes and bad defending added to a failure of adding to our goal has cost us a place in the last 16."