The visitors were rewarded for spells of dominance by a last-gasp goal.
Micheal Higdon took advantage of some poor defending by Lee Mair and slotted beyond Craig Samson in the opening minute.
St Mirren pressed for an equaliser throughout the remainder of the match and Shaun Hutchinson was dismissed in the closing stages.
However, in the last minute of injury time, Steven Thompson forced an excellent save from Darren Randolph before substitute Reilly bundled the ball into the net.
Motherwell boss Stuart McCall handed first-team debuts to both Steven Hetherington and Fraser Kerr, following knocks to Chris Humphrey and Tom Hateley in Thursday evening’s 2-0 Europa League defeat to Levante.
The home side got off to a dream start when Higdon capitalised on some hesitant defending by Mair before calmly slotting the ball beyond Samson in the opening minute.
The visitors responded in a positive fashion and only a brave block from Adam Cummins prevented Thompson profiting from Dougie Imrie’s pin-point delivery.
Mair became the first player to receive a yellow card following a poorly timed challenge on Jamie Murphy after nine minutes.
St Mirren continued to press for an equaliser and only an excellent stop by Randolph prevented Paul McGowan from levelling the scoring after a neat through ball from Graham Carey on 17 minutes.
Sam Parkin headed wide of the target as St Mirren continued to look for an equaliser.
The hosts also demonstrated their attacking threat when Henrik Ojamaa flashed an effort just wide after 33 minutes.
Thompson passed up a good opportunity to level the game six minutes before the break – losing his footing as he prepared to have an effort on goal.
Motherwell responded at the other end but Higdon could only produce a weak effort directly at Samson.
It was St Mirren who made the brighter start to the second half and Kenny McLean tested Randolph with a low drive from the edge of the box.
Jamie Murphy blazed an effort high over the bar on 51 minutes as the home side looked to build on their advantage.
Randolph did well to gather Carey’s fizzing free-kick and then was forced to tip over McGowan’s effort from the edge of the area as the visitors continued to control proceedings.
McCall made his first change of the match on 62 minutes when Humphrey replaced Murphy.
McLean then dragged an effort wide of the target after 68 minutes and Buddies manager Danny Lennon responded by introducing Gary Teale in place of Imrie.
Motherwell made their second switch of the match at the same time as Stuart Carswell came on for Nicky Law.
McGowan became the second St Mirren player to receive a booking on 72 minutes for a late challenge on Keith Lasley and he was followed into referee Euan Norris’ book by Carey, who was cautioned for pulling back Humphrey.
The hosts made their final substitution of the match when Zaine Francis-Angol was introduced in place of Ojamaa.
Higdon should have done better when released by Humphrey on 76 minutes, but blazed well wide of the target.
St Mirren continued to press for a leveller and Lennon brought on Reilly for Parkin in an attempt to boost their attacking threat.
Hutchinson received a yellow card for dissent with 10 minutes remaining and Hetherington picked up a caution four minutes later for a poor challenge on McLean.
With three minutes remaining Hutchinson was sent off for the second time in as many matches when he lunged in on Reilly – much to the anger of the home support.
Lennon’s side attempted to make the most of their man advantage and Carey stung the palms of Randolph from distance.
Four minutes of injury time presented the visitors with hope of grabbing an equaliser and after Randolph did brilliantly to deny Thompson, Reilly fired home to deny Motherwell the chance to move top of the league table.