Thompson struck on either side of a Ryan Conroy penalty, before Dougie Imrie put the gloss on the win with his first goal for the club against 10-man Dundee.
The victory ended a run of six straight defeats in the SPL for Saints, who headed into this clash just a single point ahead of today's opponents.
The visitors had an early crack at goal when Nicky Riley unleashed from distance and his shot dipped just over the crossbar.
Saints then squandered a great chance to open the scoring when a powerful shot from McGinn was spilled by goalkeeper Rab Douglas and Guy, perfectly placed to lash home the rebound, slipped in front of goal.
Dundee were dealt a blow when Colin Nish was shown a straight red card after 27 minutes for a high challenge on Paul Dummett and the striker could have few complaints about referee Willie Collum's decision.
St Mirren made the most of the numerical advantage and surged into the lead four minutes later. McLean supplied a lovely pass for Guy, who tried to round Douglas and saw his shot blocked, before Thompson pounced to stab home the opener from close range.
Dundee set about trying to level the scoreline in the second half and a ferocious drive from Riley stung the palms of goalkeeper Craig Samson shortly after the re-start.
At the other end, Gary Teale rippled the side netting, before setting up Thompson for a close-range header that produced a wonderful one-handed save from Douglas.
Saints were left rueing those missed opportunities when Dundee hauled themselves level from the penalty spot after 64 minutes.
Jim Goodwin was judged to have handled a Steven Milne shot and Conroy stepped up to convert the spot-kick with confidence, leaving Samson with no chance.
Dundee's joy was short-lived, however, when Saints restored their lead with 72 minutes on the clock. Teale sent an inviting free-kick into the box where Thompson was waiting to direct a header into the back of the net, with Douglas well beaten this time.
There was no way back for Dundee when substitute Imrie lashed low into the bottom corner to open his goal-scoring account for the Paisley club with three minutes to go.