The lively Erwin scored from a rebound in the 64th minute after Motherwell goalkeeper Dan Twardzik had kept a dominant visiting side at bay with a string of saves.
And a gobsmacked Goodwin received a second yellow card 10 minutes later, presumably for dissent, although his offence was not obvious.
It was a disastrous start to the 32-year-old's player/coach role and continued his poor disciplinary record - he received 43 yellow cards and three reds in his previous three seasons as well as a retrospective ban for a forearm smash on Dundee United's Stuart Armstrong last term.
While Goodwin played the villain again, it was Erwin and Twardzik who were the heroes for Motherwell.
Erwin, 20, was making his top-flight debut but had posted his goalscoring credentials when netting eight times in 11 matches on loan at Arbroath last season, and looked mobile, willing and inventive throughout.
Twardzik needed to be on top form as a Motherwell back four missing the injured Steven Hammell and Simon Ramsden never looked entirely comfortable.
Saints were missing the injured Steven Thompson but forwards James Marwood and Callum Ball both had ample chances to mark their debuts with goals.
The hosts had the first chance when Josh Law was played through the middle but he did not get hold of his shot and Marian Kello easily held his weak effort.
But it was St Mirren who looked the more threatening team in the opening quarter.
Twardzik reacted quickly to foil Marwood following a quickly-taken free-kick and again to block the forward's shot when Kenny McLean's ball had got him in behind Fraser Kerr.
Marwood also had a header saved following a cross by Gregg Wylde, who was seeing a lot of the ball on the left wing.
Twardzik also saved from John McGinn, pushing the midfielder's shot over the bar after Keith Lasley had been caught in possession.
Goodwin took just 22 minutes to earn his first yellow card of the season following a reckless challenge on Erwin.
Some good link-up play from Erwin soon set up Stuart Carswell 16 yards out but Kello got down well to hold the midfielder's drive.
Motherwell improved and Law had a curling effort saved but Marwood had another chance before the interval following a positive break from the back from the impressive Ellis Plummer, however his shot lacked the power and direction to beat Twardzik.
The former Dundee goalkeeper made his best save just after the interval when he touched Wylde's shot wide after the winger's pace took him clear.
Wylde soon set up McGinn and Ball, the former volleying wide and the latter forcing Twardzik into another decent stop.
Twardzik saved again from Ball as St Mirren remained on top but the opener came at the other end.
Erwin played the ball to Lionel Ainsworth 25 yards out and followed in as Kello parried the winger's stinging shot.
The striker had plenty to do but he guided the ball inside Kello's near post from 10 yards.
Saints tried to fight back and Twardzik beat away Jason Naismith's powerful strike before Ball blazed over from 12 yards after McLean's run had opened up the home defence.
But their chances were hit with a huge blow when Goodwin was shown a second yellow card by Callum Murray right out of the blue as Motherwell prepared to take a free-kick following McGinn's foul on Lasley.
But Saints kept pushing and Lasley, who gave away three penalties in Motherwell's Europa League loss to Stjarnan, survived loud appeals for handball in his own box.
And Twardzik was needed for one final save as he leapt to his left to push away a shot from substitute Ross Caldwell.