The 20-year-old reacted first as Craig Conway's corner bobbed around in the six-yard box and rattled his close-range shot in off the underside of the bar.
The visitors were the stronger side throughout, with Saints appearing to suffer a costly hangover after their Co-operative Insurance Cup semi-final defeat to Rangers in midweek.
The home team had reason to feel aggrieved, however, when they were denied what appeared to be a stonewall penalty early in the first half as Murray Davidson's run was blocked by Jon Daly.
But the Perth outfit failed to create enough scoring opportunities to merit their place in the next round.
Saints' new signing Michael Duberry, recruited on Friday, did not have to wait long for his first involvement on his debut as he skewed his header out of play with barely 15 seconds on the clock.
Five minutes later, the former Chelsea and Leeds defender was beaten all ends up on the byline by Goodwillie but the United striker's eventual shot from an acute angle was blocked by the chest of goalkeeper Graeme Smith.
In between times, Gary Irvine was shown a yellow card after only 80 seconds for a wild lunge at Conway as the action took on a frenetic pace straight from kick-off.
Referee Craig Thomson was then put on the spot in the 15th minute but opted to wave play on when Davidson felt he had been unfairly blocked by Daly.
United carved out the next chance when Conway delivered a magnificent cross from the left flank but Danny Swanson's downward header was grabbed at the second attempt by Smith.
The visitors continued to look the more likely but Saints finally threatened at the other end with 10 minutes to go to the interval when they were awarded a free-kick on the edge of the box following Darren Dods' foul on Kenny Deuchar.
Danny Grainger worked a short set-piece with Jody Morris but his curling effort was held comfortably on his line by United keeper Dusan Pernis.
Goodwillie should have done better when Swanson robbed Morais and sent the striker through on goal but the youngster opted to try to round the keeper and drifted too wide to get a clean shot on goal.
However, the 20-year-old earned redemption on the stroke of half-time as he sent United into the lead.
Conway's corner caused consternation in the six-yard box and Goodwillie reacted fastest to find the back of the net via the underside of the bar.
The second period continued in a similar vein to the first, with United looking the more dangerous.
Prince Buaben almost made the most of a lucky break as he burst through the home defence but, perhaps put off by a slight nudge from the experienced Duberry, he allowed Smith to deflect his shot wide for a fruitless corner.
Substitute Peter MacDonald almost made the impact St Johnstone were seeking in the 56th minute as Morais' reverse pass sent him scampering in on goal.
But, after rounding Pernis, the striker could not get enough power on his left-footed shot and Paul Dixon got back to block on the line.
The visitors could have wrapped up the tie on the break as substitute Damian Casalinuovo latched onto Daly's flick-on but the Argentinian forward failed to spot the supporting run of Buaben and fired wildly over.
Replacement David Robertson then came within inches of a second in stoppage time as his shot from Conway's pass rattled off the woodwork with Smith well beaten.
The last chance of an action-packed match came at the other end but veteran substitute Paul Sheerin headed Grainger's cross wide when he could have grabbed a dramatic equaliser.