Ander Herrera had given the Red Devils the lead but after Ki Sung-Yeung's equaliser, Jonjo Shelvey's drive deflected in off the striker to seal three points for Garry Monk's side
Ander Herrera cleared an early Bafetimbi Gomis header off the line before making an impact at the other end as he drove a shot into the bottom corner from the edge of the area.
United's lead lasted fewer than two minutes though as Ki-Sung Yueng nipped in to poke Jonjo Shelvey's low cross past David De Gea.
The Red Devils dominated thereafter, but fell behind with 17 minutes left on the clock as Shelvey's long-range effort deflected in off Gomis' back.
Robin van Persie's return from injury saw Radamel Falcao drop to the bench following a disappointing display at Preston North End in the FA Cup on Monday, while Swansea adopted an unfamiliar narrow formation as Gylfi Sigurdsson made his comeback from a three-match ban.
Garry Monk's new set-up almost paid off in the opening stages as Wayne Routledge found a gap in the United defence, but Sigurdsson's eventual effort deflected wide.
Gomis' powerful header from the resulting corner looked destined for the bottom left-hand corner before being cleared off the line by Herrera, and the French striker nodded over soon after.
United offered little in attack early on and Van Persie was unable to find the target from a tight angle when goalkeeper Lukasz Fabianski flapped at a Wayne Rooney cross.
Swansea continued to pose the greater threat, with Routledge – given time to turn in the United box – sending a soft effort into the arms of De Gea after 17 minutes.
Having saved his side at one end, it was Herrera who put United in front against the run of play at the other in the 28th minute.
Angel Di Maria found Herrera in space just inside the box and the Spanish midfielder guided a low strike into the bottom-left corner via the slightest of deflections from Swansea captain Ashley Williams.
That lead lasted just two minutes, though, as Ki – scorer of Swansea's opener in the victory at Old Trafford in August – turned in a Shelvey cross.
The South Korea international came close to applying the finish to another Shelvey centre early in the second half, but De Gea did well to rush off his line and thwart the attack.
Van Persie fired into the side-netting as United probed with a series of attacks, but the Swansea backline was holding firm.
And Swansea's patience paid off when Shelvey rifled home a winner from 20 yards, although the ball did take a significant nick off the back of Gomis.
United pressed forward, as they had done in search of a winner prior to Swansea's second strike, but the home side clung on for just their second win in eight league matches.