The Lilywhites looked to be heading for defeat as they trailed the Shaymen 2-0 in the closing stages of the Fourth Division clash.
However, Thomas then stepped up to the plate and showed his predatory instincts in front of goal.
The striker had already netted four goals in an early-season flourish and took things to another level with this treble.
Victory sent North End to the top of the table, just four months after they had been forced to apply for re-election having finished second bottom.
PNE were seven games unbeaten in league and cup going into this clash, John McGrath having stamped his mark on Deepdale quickly after his summer arrival as manager.
So it was something of a shock when Halifax took the lead after only three minutes.
A corner on the left was played short and then swung over to the far post where Town centre-half Alan Knill headed home.
The visitors were to double their advantage in the first half, a Gary Brazil pass intercepted by Adrian Shaw.
He fed Dave Longhurst who burst into the North End box and fired a shot past goalkeeper David Brown.
PNE’s one chance of note of a disappointing first-half was a shot from Oshor Williams which Paddy Roche pushed behind.
Halifax continued to have the better of the play after half-time and North End initially didn’t show any signs of getting back into the game.
That changed in the 68th minute as the home side started their comeback.
Ronnie Hildersley won a free-kick on the left, one he dusted himself down to take himself.
Hildersley delivered it into the box where Thomas rose to send a header into the bottom corner.
That was the cue for PNE to up the pressure and in the 81st minute they equalised.
Brazil robbed possession from Mick Galloway near to the corner flag before curling over a cross which Thomas darted forward to meet and loop a header into the back of the net.
Deepdale erupted and the noise only got louder when the winner arrived with four minutes remaining.
Preston were awarded a free-kick after Williams got a shove.
Les Chapman played it into the box, Sam Allardyce headed the ball on and there was Thomas to swivel and volley into the net.
North End boss McGrath was delighted with his side’s fighting spirit.
“Many teams would have been dead and buried, trailing 2-0 with just 20 minutes to go,” said McGrath.
“We showed we are capable of fighting for the full 90 minutes and have the bottle to face adversity.
“John Thomas has made a fine start and his hat-trick was a smashing reward.”
PNE: Brown, Bennett, Chapman, Allardyce, Jones, McAteer, Williams, Clark, Hildersley, Brazil, Thomas. Sub (not used): Atkins