Both teams went into the game having made their best start to a Premier League campaign, but it was the hosts who maintained their momentum with a come-from-behind success.
Swansea were first to strike when Wilfried Bony continued his hot streak by slotting home a seventh goal in 10 games and his 19th in the league this calendar year, one more than Sergio Aguero.
Carroll had not hit the back of the net for West Ham since March, but produced a trademark powerful header to end a barren run of 878 minutes before the interval.
Bony went close to netting again when finding the woodwork in the second half, but it was Carroll who hit the headlines as he outjumped the Swansea defence to nod in a second-half corner.
Hopes of a comeback from the visitors were severely hampered by goalkeeper Lukasz Fabianski seeing red soon after.
And Carroll turned provider late on as Diafra Sakho raced onto his flick-on to add a third as Sam Allardyce's men made it three wins in a row.
West Ham, with Alex Song and Enner Valencia back in for Morgan Amalfitano and Mauro Zarate, looked to push forward in the early stages and had a penalty appeal turned down when Carl Jenkinson's cross struck Jazz Richards on the elbow.
Fabianski saved well with his legs from Kevin Nolan, who failed to connect properly with an earlier chance, and the visitors made the most of those let-offs when scoring with their first real attack.
Jefferson Montero played a neat one-two with Gylfi Sigurdsson before pulling back for Bony to produce a clinical side-foot finish after 19 minutes.
Ashley Williams bravely blocked a Valencia effort following a nod down from Carroll, while Sigurdsson tested Adrian with a stinging drive at the other end.
Bony was inches wide with a rasping strike from 20 yards out, before West Ham enjoyed a period of sustained pressure which ended with Carroll spectacularly heading in a Jenkinson cross with four minutes of the half remaining.
West Ham began the second period by bringing on Sakho to replace Valencia, with the Senegal striker returning from a month out with a back injury.
Swansea, with Angel Rangel in for suspended defender Neil Taylor, were clearly going to have to soak up some strong aerial assaults at the back.
However, it was the Welsh outfit who had the first big chance after the break when Bony struck the bar from long range on the counter-attack with an hour gone.
Rangel had to be alert to clear a Sakho cross away from goal, but it proved only a brief respite as Carroll rose highest to head in a Stewart Downing corner after 66 minutes.
Sakho then hit the post after latching onto a throughball and rounding Fabianski, who was then sent off by Chris Foy for impeding the striker.
West Ham should have increased their lead when Sakho was left one-on-one with substitute keeper Gerhard Tremmel, but he shot against the base of the post.
Sakho made amends for that miss, though, when Carroll headed on a long ball and he powered through to fire over Tremmel with three minutes remaining.
Carroll's hat-trick attempt was cleared off the line and Tremmel saved well from Sakho as West Ham finished with a flourish.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.