The hosts had taken the lead with just six minutes left thanks to a fantastic goal from Kallum Higginbotham but substitute Tony Andreu equalised three minutes later, before his fellow replacement Jason Scotland scored a stoppage-time winner to make it three victories in a row for the Lanarkshire side.
A mere couple of minutes had elapsed when the first good chance arrived, Hamilton's Louis Longridge denied by Paul Gallacher, who did really well to keep out the close-range effort.
Partick's Gary Fraser then whipped a free-kick towards the bottom corner but Michael McGovern saved.
Mickael Antoine-Curier hit the post after a Longridge cross but had been flagged offside beforehand in any case and Ali Crawford then shot wide for the Accies.
The hosts then had a good spell but Stephen O'Donnell tried to cross for Steven Lawless rather than shoot, allowing Ziggy Gordon to make a key interception.
Dale Keenan then put Ryan Stevenson through on goal, only for McGovern to rush off his line and make a good block.
Gary Fraser then shot inches wide for Partick from the edge of the box and it was all-square at the half-time interval.
Thistle were first to show after the break, Lawless having a shot tipped around the post by McGovern and Higginbotham putting a free-kick just wide.
Antoine-Curier then put a shot into the side-netting after Longridge had picked him out at the back post.
Partick's Conrad Balatoni was in action at both ends of the pitch as the match entered the final quarter of an hour, heading the ball straight at McGovern from a corner, before producing a superb tackle to foil Crawford.
Crawford was in on goal again moments later but this time he was denied by the trailing boot of Gallacher.
And the hosts then took the lead in the 84th-minute when Higginbotham brilliantly volleyed the ball into the top corner from 25 yards out after an O'Donnell throw-in.
But there was more drama just two minutes later, Crawford producing a delightful reverse pass to play in Andreu (87), who confidently slotted the ball home from 12 yards out.
And the Accies then got the winner in the second-minute of stoppage-time as Scotland guided a shot into the corner of the net after a slip from Balatoni.