Match ends, Dundee United 3, St Mirren 2.
Nadir Ciftci's injury-time winner snatched all three points for Dundee United, who came back from two goals down to beat a shocked St Mirren.
Paul McGowan's clever finish and a scrappy second from Steven Thompson gave the Buddies a comfortable lead.
But Brian Graham pulled one back for United with 11 minutes remaining amid offside claims by the visitors.
Armstrong's classy side-foot into the top corner then brought United level before Ciftci scored with seconds left.
Given St Mirren were 2-0 ahead going into the closing stages, Armstrong's equaliser was sore enough, never mind the Turkish striker's last-gasp winner.
From being on course for their second consecutive Premiership win, Danny Lennon's men left Tannadice with nothing.
Saints took the lead on 20 minutes when McGowan cleverly back-headed a free-kick from the left past Radoslaw Cierznak for his third goal of the season.
United, who made three changes from the side that lost to St Johnstone on Wednesday night, looked out of sorts and were being pinned back with the Buddies looking the livelier side.
St Mirren's second - Thompson's 14th goal of the season - came fortuitously. United defender Gavin Gunning tried to clear John McGinn's whipped cross, only for the ball to cannon against the Buddies striker and into the net from four yards.
At the start of the second-half, Gary Mackay-Steven released Ciftci but the Turkish striker took one touch too many as he attempted to round Marian Kello and the chance was gone.
Minutes later, Mackay-Steven struck a blistering 25-yard drive which Kello spectacularly turned over.
But the Arabs pulled one back in 79 minutes when Ciftci's pass released Ryan Dow, whose cross was turned home from close range by fellow substitute Graham.
And five minutes later they found themselves back on level terms through Armstrong.
Marc McAusland was not able to properly clear Mackay-Steven's cross and Armstrong was on hand to apply the finishing touch with a calm finish from 15 yards.
Then, in injury-time, Ciftci bundled the ball home from close-range after Kello had spilled Dow's powerful shot to complete a magnificent comeback.
Dundee United manager Jackie McNamara: "We got a break at our first goal. It looked offside although I would need to see it again but the lads showed great character to get it back to 2-2 and then pushed on for a winner.
"There was a lot of character from the team. I was kind of planning to make a few changes on the hour mark.
"Young Ryan Dow did really well when he came on when the game was a bit stretched and that helped.
"I thought St Mirren deserved a lot of credit for the way they played. They were excellent in the first-half. Take nothing away from them in that respect. I knew they wouldn't be able to sustain it for the full 90 minutes.
"It was a great response from us. I'm delighted about that and to get back to winning ways."
St Mirren manager Danny Lennon: "It was a big decision which went against us.
"I've no doubts they had at least three men offside for their first goal. That gave them a helping hand at that stage in the game.
"We played really well up until then but that changed things completely.
"I'm really disappointed for the players for all they put into the match."
- 26RobertsonBooked at 78mins
- 6PatonSubstituted forGrahamat 76'minutes
- 19GauldSubstituted forArmstrongat 61'minutes
- 29El AlaguiSubstituted forDowat 61'minutes
- 22NaismithSubstituted forWyldeat 54'minutes
- 14McAuslandBooked at 32mins
- 10McGowanSubstituted forTealeat 85'minutes
- Craig Thomson
- Shots on Target
Second Half ends, Dundee United 3, St Mirren 2.
Attempt saved. Ryan Dow (Dundee United) right footed shot from outside the box is saved in the bottom right corner.
Goal! Dundee United 3, St Mirren 2. Nadir Ciftci (Dundee United) right footed shot from very close range to the centre of the goal.
Attempt missed. John Rankin (Dundee United) left footed shot from the centre of the box is close, but misses to the right.
Corner, Dundee United. Conceded by Darren McGregor.
Attempt missed. Brian Graham (Dundee United) right footed shot from the centre of the box misses to the left.
Attempt saved. John Rankin (Dundee United) left footed shot from outside the box is saved in the centre of the goal.
Substitution, St Mirren. Gary Teale replaces Paul McGowan.
Goal! Dundee United 2, St Mirren 2. Stuart Armstrong (Dundee United) right footed shot from the centre of the box to the top right corner.
John Rankin (Dundee United) wins a free kick in the defensive half.
Foul by Paul McGowan (St Mirren).
Corner, Dundee United. Conceded by Marc McAusland.
Foul by Stuart Armstrong (Dundee United).
Kenny McLean (St Mirren) wins a free kick in the attacking half.
Goal! Dundee United 1, St Mirren 2. Brian Graham (Dundee United) right footed shot from very close range to the centre of the goal. Assisted by Ryan Dow with a cross.
Andrew Robertson (Dundee United) is shown the yellow card.
John Rankin (Dundee United) wins a free kick in the attacking half.
Foul by Conor Newton (St Mirren).
Substitution, Dundee United. Brian Graham replaces Paul Paton.