The Glovers peppered the Pools’ goal in the opening 45 minutes but were thwarted by some dogged defending and Trevor Carson in the visiting goal.
Yeovil did take the lead just before the hour mark through Matt Butcher before Thomas netted the first of his two goals after a blistering counter-attack from a Glovers’ corner.
With the game heading for a draw, the visitors stole all three points when Thomas curled an effort into bottom corner past Artur Krysiak after 92 minutes.
Darren Way brought back in central defender Alex Lacey – who was passed fit to play with a cast on his left arm after breaking a bone against Luton last month – awarding the 23-year-old the captaincy instead of Ryan Dickson who missed out altogether through injury.
Ryan Hedges returned on the right wing from Wales Under-21 international duty, with Izale McLeod dropping to the bench.
Looking to get a positive result in their third match in a row at Huish Park, the Glovers immediately looked to get on the front foot and had the ball in the net after four minutes.
Nathan Smith’s challenge on visiting ‘keeper Trevor Carson from Matt Dolan’s corner ended with the ball in the net, but referee Charles Breakspear adjudged Smith to have fouled Carson.
That was as good as it got in terms of goalmouth action in the opening 20 minutes, but Yeovil found their attacking feet midway through the first half and peppered the Hartlepool goal with shots on goal.
Kevin Dawson and Hedges both had goal-bound efforts blocked inside the box, before Tom Eaves had a penalty appeal waved away after going down under challenge close to the by-line.
In a rare foray into Yeovil’s half Craig Hignett’s side almost took the lead when Nathan Thomas’ snapshot from the edge of the box flashed past Artur Krysiak’s post, but that was as good as it got for the visitors as they had to cling on to keep the score at deadlock.
A moment of individual brilliance just past the half-hour mark saw Hedges dribble from the halfway line into the Pools’ box, only for the wideman’s low shot to be saved well by the legs of Carson.
With ten minutes of the first half remaining the Glovers enjoyed sustained spell of pressure in the Hartlepool final third, with a series of corners resulting in Smith finding the side-netting, and Eaves and Khan both having shots deflected wide.
The Glovers continued to press after the break but it the visitors who drew the first save of the second half, as Thomas’ effort from just inside the box was pushed behind for a corner by Krysiak.
After a frustrating first half in terms of failing to find a way past Carson in the visiting goal, Town triumphed with their first meaningful attempt on target in the second period.
Hartlepool failed to properly clear Dolan’s corner and after a neat turn, Matt Butcher fired past a diving Carson to score his first ever senior goal and his first goal in a Yeovil shirt.
Darren Way’s side continued to press and were dealt a sucker punch just ten minutes after taking the lead when from another Yeovil corner, Carson claimed and launched a quick fire counter-attack with his long ball finding Thomas who raced through and narrowly squeezed an effort under the sprawling Krysiak, levelling the scores against the run of play.
Town introduced both Izale McLeod and Tahvon Campbell after 76 minutes in place of Tom Eaves and Otis Khan, before Ben Whitfield took to the field in place of Lawless with a little under ten minutes remaining.
Perhaps feeling unfortunate to only be drawing the match, Yeovil continued to search for a winner late on, but were dealt a late blow when Thomas curled an effort past the Yeovil stopper to steal all three points and claim an unlikely victory.
Yeovil Town: Krysiak; Shephard, Lacey, Smith, Butcher; Dawson, Lawless (Whitfield 84’), Dolan; Khan (Campbell 76’), Eaves (McLeod 76’), Hedges.
Bookings: Smith 75’.
Subs not used: Maddison, Mugabi, Sowunmi, Copp.
Hartlepool United: Carson; Nsiala, Harrison, Jones (Alessandra 45’); Magnay, Hawkins (Deverdics 86’), Featherstone, Laurent, Donnelly; Thomas, Amond (Fewster 77’).
Bookings: Carson 40’, Laurent 83’, Deverdics 90’.
Subs not used: Bartlett, Paynter, Richards, Heardman.