England manager Roy Hodgson required inspiration and found it in the shape of substitute Theo Walcott as the Arsenal attacker turned the game around with a spectacular equaliser and a penetrating run to set up Welbeck's deft back-heel with 12 minutes left.
Hodgson's side had been derided in some quarters for their conservative approach in the opening 1-1 draw with France but there could be no complaints about the entertainment value on offer here in Ukraine - although not all of it was intentional or admirable.
He will take heart from England's positive response to adversity but will be hugely concerned that trouble came as the result of a collective lapse of defensive concentration that gave Sweden an all-too-easy route back into this contest.
England know a draw against co-hosts Ukraine in Donetsk next Tuesday will put them through to the Euro 2012 quarter-finals, but they will face a team with ambitions of their own in that direction in what will be a hostile atmosphere inside the Donbass Arena.
Hodgson's plan was clear and was revealed by Carroll's recall. Sweden's defence had a weakness in the air and England were intent on probing it.
England's first threat came from midfield man Scott Parker when he saw his rising 25-yard shot clawed away by Sweden goalkeeper Andreas Isaksson.
And there was a hint of things to come when Welbeck rose to meet James Milner's cross, but his glancing header was weak and lacked the direction to trouble Isaksson.
When England broke the deadlock it came from a move that was straight from Hodgson's strategy both in creation and execution.
Gerrard's cross from the right wing was met by the soaring figure of Carroll as he got in between Andreas Granqvist and Mellberg to power a header past Isaksson.
Sweden were carrying few attacking threats, although the ease with which Zlatan Ibrahimovic brushed Parker off the ball and then won a straight race with a ponderous-looking John Terry were causes for concern.
Kim Kallstrom shot just over after Glen Johnson lost possession and Hart had to dive at the feet of Johan Elmander as the Swedes attempted to restore equality before the break.
After looking relatively settled, England were set back by a scrappy mess of an equaliser for Sweden four minutes after the restart. Ibrahimovic's free-kick, conceded needlessly by Carroll, was not cleared and Mellberg's shot was palmed on to Johnson before going into the net.
Sweden had emerged with a sense of purpose they never showed in the first half and were ahead just before the hour - but once again England were guilty of defending in a manner that manager Hodgson will find unacceptable.
Welbeck flick puts England back in front
Mellberg was allowed to rise unmarked amid a mass of dozing defenders to meet Seb Larsson's free-kick and send a downward header past Hart as England's players looked bemused at the fate that had befallen them.
Hodgson's reaction was to introduce Walcott for Milner and it was a change that reaped a rich reward as the Arsenal attacker played a decisive part in England's recovery.
Walcott's swerving finish for his first international goal in nearly four years brought England level after 64 minutes before his darting run into the area and cross allowed Welbeck to apply an instinctive back-flick finish.
In the closing moments captain Gerrard could have given the scoreline a more convincing appearance but Isaksson did brilliantly to block his close-range volley.
The victory was secured, but Hodgson and England will be well aware they survived a scare caused by their own carelessness.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.