The scores were level at 4-4 heading into the final minute, thanks to two Lachlan Coote penalties and a Jake Bibby try for Wigan, and Zak Hardaker had the chance to win it for the Warriors with a penalty from 45 metres at Hull’s KCOM Stadium.
But the centre dragged his effort wide with 50 seconds remaining and St Helens aimed to work downfield for a late drop-goal attempt, managing to gain territory in the Warriors’ half.
Tommy Makinson was lined up for the effort and, as the ball landed in the winger’s hands, the full-time hooter sounded. His attempt looked to have the distance, but the drama did not end there.
The ball rattled the right-hand post and landed on the turf before bouncing towards the in-goal area, with Wigan full-back Bevan French attempting to shield the loose ball to safety.
However, centre Welsby’s valiant chase proved valuable as he dived for the ball, grounded inches short of the dead-ball line and – after a lengthy look by video referee Ben Thaler – scored the winning try to jubilant celebrations from Kristian Woolf’s side.
Veteran prop James Graham, in the last game of his illustrious career, was reduced to tears on the sidelines as he signed off with a Grand Final ring.
The season’s top two teams went head to head in the title decider and defence was on top throughout the contest in a war of attrition.
There was a brief injury scare for Graham in the fourth minute after a crunching tackle from Thomas Leuluai, in a sign of what was to come.
The two packs continued to dominate as both sides looked to minimise mistakes and run it through the middle, with Saints enjoying the better of the territory.
Wigan’s Joe Burgess sustained a head knock in the 24th minute which forced a reshuffle in the Warriors’ backline, with Hardaker moving to the left wing and Willie Isa slotting into the centre.
And the enforced change almost paid dividends three minutes later when Hardaker was held up over the whitewash following a superb cut-out pass from Jackson Hastings.
Sean O’Loughlin entered the fray in the 29th minute to become the oldest player to appear in a Grand Final at the age of 38 years and three days – also the final game of his career.
The match looked set to remain scoreless at the break until Morgan Smithies caught Coote with a late shoulder charge in the final minute of the first half.
Smithies was fortunate not to be sin-binned for the late hit, but Coote held his nerve to kick the penalty – as the half-time hooter sounded – to edge the defending champions into a slender lead.
The second half followed a similar pattern to the first, with Saints pinning Wigan in their own half, including three successive sets after sustained pressure.
Wigan could not get out of their own half and Zeb Taia thought he had crossed in his final game for St Helens, but his 55th-minute effort was chalked off by the video referee for offside.
Another fine cut-out pass from Hastings set up a Warriors attack moments later, as Adrian Lam’s side made a rare venture into Saints’ half. However, defence continued to come out on top as Bibby was pulled into touch.
But the winger was not to be denied in the 66th minute, when a flowing move involving Hastings and Leuluai resulted in French finding Bibby to cross in the corner for the opening try.
Hardaker’s touchline conversion hit the crossbar as Wigan led 4-2, only for Coote to level in the 72nd minute with a penalty after a high tackle from Hastings.
The absorbing defensive battle looked to be heading for a first ever golden point finale, but Saints snatched victory in a ludicrous last act befitting of a Grand Final.