The hosts had lost only once in their previous 18 matches in all competitions, and they surpassed their goals tally for last season as they took their total to 44 - two more than their entire haul in 2011-12.
St Mirren stunned their opponents when they scored after just 76 seconds through Dougie Imrie, but Andrew Shinnie equalised after 38 minutes only for Steven Thompson to put the visitors back in the driving seat 10 minutes after the restart. However, Inverness captain Richie Foran headed the home side level again with 67 minutes played.
Thompson started a lightning three-man move after 76 seconds and Dougie Imrie finished it off with a low angled shot from 18 yards after Paul McGowan had also played his part as the link man.
Inverness recovered quickly from their early setback and after a period of fairly sustained pressure, Owain Tudur Jones almost snatched an equaliser with a snap-shot from 25 yards that sneaked past the left post in the 18th minute.
But St Mirren very nearly increased their lead after 21 minutes. Graham Carey's fiercely struck free-kick on the right side from 25 yards cannoned off the crossbar with goalkeeper Antonio Reguero rooted to the spot.
Inverness returned to the offensive and top-scorer Billy McKay was denied his 19th goal of the season when Samson made an outstanding save to block the striker's header from point-blank range after Aaron Doran had played the ball in.
But the keeper was unable to stop Shinnie's strike drawing Inverness level after 38 minutes. McKay played a pass to the midfielder and Shinnie cut inside before looking up quickly to pick his spot and drove the ball in the top right-hand corner from approximately 25 yards.
Thompson blazed over before restoring St Mirren's advantage 10 minutes after the restart, heading home Teale's cross from close in but Inverness continued to look capable of exploiting deficiencies in St Mirren's back division and they did so after 67 minutes.
Doran lashed in a powerful shot and Samson could only push the ball into the air and Foran was able to head past him from close range.