Danny Lennon's side reached the final of the Scottish Communities League Cup with a 3-2 victory over Celtic on Sunday and Steven Thompson's late header on Wednesday night earned the Buddies their second win in four days.
Esmael Goncalves latched on to Paul McGowan's through-ball to net on his home debut and open the scoring midway through the first half. That was then cancelled out on the stroke of half-time when Billy McKay netted his 20th league goal from the penalty spot after Conor Newton felled Richie Foran inside the box.
Inverness enjoyed the majority of the possession in the second half, however they were punished with nine minutes remaining when Thompson beat Antonio Reguero after connecting with Gary Teale's pinpoint cross.
A wonderful 30-yard free-kick from Owain Tudur Jones after six minutes had both sets of supporters on their feet. The Welsh midfielder blazed an effort towards the top corner, which Craig Samson did superbly to claw away.
Marc McAusland failed to find the target from McGowan's corner, however the home fans did not have to wait long for the opening goal, McGowan cleverly chipped the ball through to Goncalves and he composed himself before slotting the ball beyond Reguero.
The home supporters roared for a penalty when Graeme Shinnie appeared to fell Goncalves inside the area, however referee Alan Muir quickly waved play-on.
Inverness had a penalty shout of their own with two minutes remaining in the first half as Foran toppled under the attention of Conor Newton and this time Muir pointed at the spot. McKay stepped up to take the kick and sent Samson the wrong way to level the scores.
The first chance of the second half fell to the visitors and Andrew Shinnie's shot clipped the top of Jim Goodwin's head before looping over the bar. Graham Carey floated a shot just wide of the target as St Mirren created a rare second-half opportunity and they were to go one better just a minute later.
Teale swung over an inch-perfect cross and Thompson's header sneaked into the net after hitting the inside of the post to ensure St Mirren claimed the win.