Striker Carroll opened the scoring but Olof Mellberg's double put Sweden in control on the hour.
Sub Theo Walcott hit a 25-yarder before setting up Welbeck's clincher.
Welbeck said: "We went behind but had the belief, team spirit shone through.
"Our attention now turns to Ukraine on Tuesday, to get another win that could see us win the group.
"I'm happy with the finish for my goal and the three points for the team."