Franco Miranda set the ball rolling with the opener before Jack Ross nodded into his own net. Another own goal from Chris Swailes proved to be decisive as the visitors claimed the points.
Both teams were tipped as potential relegation candidates at the start of the season but the clash at New Douglas Park allowed Saints to open up a two-point gap on the SPL new boys.
Hamilton manager Billy Reid made two changes from the side who lost 4-0 to Celtic before the international break.
Mark Corcoran and Richard Offiong were drafted into the starting line-up, with David Elebert and Derek Lyle dropped to the bench.
Mark McLaughlin - back in training after six weeks out of action with a knee injury - narrowly missed out on selection this time around but could feature against Rangers next week.
Saints also made two changes from the side who earned a shock win over Rangers in their last outing. Miranda was back from suspension and started along with Hugh Murray at the expense of Scott Cuthbert and Andy Dorman.
St Mirren had a decent chance early on when Ross slipped a pass through to Garry Brady and he attempted to set up Dennis Wyness, who was lurking in the six-yard box. But goalkeeper Tomas Cerny managed to smother at the near post before the striker could pull the trigger.
It was the home side's turn to threaten when David Graham supplied the cross to the head of Offiong, who nodded inches over the crossbar from 12 yards out, but Mark Howard appeared to have the header covered anyway.
The breakthrough came with 16 minutes gone, when Accies lost possession at a throw-in and Steven Robb collected from Wyness before putting Miranda through on goal.
The full-back managed to poke into the bottom corner of the net from 15 yards.
Hamilton were back on level terms 10 minutes later. A Will Haining foul on Offiong proved costly when Corcoran stepped up for the free-kick and sent a lovely curling shot towards goal, which was helped over the line by the head of Ross.
Accies could have added to their tally moments later when Simon Mensing nodded just over from a Graham corner, before James McCarthy fired narrowly off-target as the home side attempted to crank up the pressure.
Saints could have restored their lead after 34 minutes when they were awarded a dubious penalty - which appeared to be given belatedly by referee David Somers on the advice of his assistant - when Mensing was deemed to have fouled Robb.
Billy Mehmet saw his spot-kick blocked by Cerny, who then gathered the striker's headed rebound attempt.
But Saints were celebrating four minutes from half-time when Murray's cutback was met by Mehmet, who tried his luck with a looping header. Several Accies players attempted to clear the danger, with Swailes appearing to inadvertently knock the ball into his own net.
There was still time for one final piece of drama in an action packed first half when the referee was forced to stop the game after the pitch's sprinklers spontaneously switched themselves on in injury-time.
Accies made their first change at the break, swapping Mensing for Chris Casement before Graham was withdrawn for Stephen Ettien.
But it was Saints who looked most likely to find the back of the net again. A point-blank shot from Robb was blocked by the keeper before Mehmet's rebound flashed across goal and wide of the upright.
The home side tried to push forward in search of another equaliser but a lack of cutting edge in front of goal was a problem and Lucas Akins was thrown into the action in place of Corcoran for the last 20 minutes.
Offiong had a go for Hamilton when he turned in the box and unleashed a ferocious left-footed shot which dipped just over the target.
Saints then made a double change, throwing Craig Dargo and Stephen McGinn - who grabbed the winner when he came off the bench against Rangers in their last outing - into the action.
The away fans claimed for a penalty with a few minutes to go when another substitute, Dorman, went to ground under pressure from Martin Canning but St Mirren held on for the win.