The former Scotland striker guided home the opener in the 39th minute and soon took advantage of some slack defending to head in from a tight angle.
Motherwell came from two goals down to win against Hibernian last weekend and Bob McHugh, who netted the winner at Easter Road, again came off the bench and scored to give them hope in the final 13 minutes.
But St Mirren held on to make it seven points from three home games and end Motherwell's four-match winning streak on the road in the SPL.
Motherwell spent the opening moments giving the ball away but soon settled down and both Nicky Law and Jamie Murphy had long-range efforts diverted away from goal.
The visitors began zipping the ball around but they almost conceded from John McGinn's 19th-minute corner, when Jim Goodwin managed to steer the ball on target from beyond the far post but Tom Hateley cleared off the line.
Well soon went close when Law hung a cross to the back post following a short corner and Shaun Hutchinson headed towards the top corner, but Craig Samson produced a wonderful reaction save to claw the ball out.
The game was open but Motherwell were still edging possession and territory. However, they were leaving gaps at the back and they had a warning when McGinn's diagonal ball beat their defence. Lewis Guy's touch took him away from goal but, with goalkeeper Darren Randolph and his two defenders committed, Guy rolled the ball back for Thompson, whose shot lacked conviction and was blocked by Simon Ramsden.
Thompson made amends three minutes later with a clever finish from six yards. Saints kept possession after an attack was forced back and worked the ball to Marc McAusland in the right-back position. He played a one-two with Jon Robertson that sent the midfielder away down the right, and Robertson whipped in a cross that Thompson guided into the far corner.
Motherwell were then undone by a counter-attack. Some tidy play from McGinn gave Gary Teale the chance to skip past Humphrey and send over a deep cross from the right. Hateley failed to get off the ground and Thompson rose to head the ball over Randolph and in off the far post from a tight angle.
The game was almost over three minutes after the break when Guy got the better of Hutchinson and cut the ball back for McGinn, who tried to steer the ball inside the far corner. However, Randolph threw himself to his left to push the ball wide.
Kenny McLean also came close from a free-kick for the hosts.
Motherwell were having plenty of possession but were finding St Mirren a compact unit to break down and had three penalty appeals turned down by Iain Brines after the ball appeared to strike the hand of David Barron, twice, and then Goodwin.
Henrik Ojamaa shot wide from 20 yards after threatening to get beyond the Saints defence.
McHugh came on in the 69th minute and soon got a chance when he met Humphrey's cutback, but Goodwin threw himself in the way of the shot to prevent a goal.
The striker then had a better chance when he latched on to a ball over the top but blasted just over from 15 yards.
McHugh soon got Motherwell back in the game when he fired a left-footed shot in off the bar from similar distance after good work from Ojamaa on the left.
Law then used the same route to set up another chance but Paul Dummett twice threw himself in front of Murphy's shot.
Samson saved from Ojamaa and Hutchinson as Motherwell pressed but St Mirren came closer to a late goal when McAusland headed just over.