The visitors came out of the traps flying and could have been ahead inside the first few minutes when Aaron Cresswell crossed to Michail Antonio in the six-yard box, but the winger sent his shot wide of the post.
Boro began to fight their way back into the game, with Calum Chambers in particular proving productive down the right, and as the half-hour mark approached Christian Stuani brought them back on level terms. A good team effort saw Adama Traore work the ball forward to Chambers, who crossed for Stuani to make a simple tap-in at the back post.
The momentum was now with Boro and Traore had two chances to put the hosts in front as the half-time whistle approached, but Alvaro Negredo was unable to convert either chance.
The Hammers soon had their noses back in front - against the run of play - as Carroll grabbed his second of the day and a fifth for the season. Antonio picked the ball up and fired from 30 yards out, and Victor Valdes's resulting save went straight into the path of Carroll to tap home.
The visitors made a bright start to the second half and could have extended their advantage almost immediately as Carroll played into Lanzini who, with only Valdes to beat, could only send his shot straight into the arms of the keeper.
Traore and Chambers were providing the best chances in response in what started to become a scrappy affair, the Spaniard working well to cross in for Marten de Roon, but his header was cleared by Darren Randolph for a corner.
The home side had their own turn for penalty shouts as the clock began to run down, first as Cresswell appeared to block Stuani's shot with a hand then again moments later as Sam Byram tugged back Traore on the edge of the box, but Atkinson waved away the appeals.
Karanka brought on new signings Patrick Bamford and Rudy Gestede as he looked to force an equaliser with a front three, but Bilic replied by switching to five at the back.
Boro were duly frustrated in their efforts and with just a minute of stoppage time to play, Calleri put the result beyond doubt.
Edmilson Fernandes mistimed his shot across goal to Lanzini, but the winger did well to keep the ball and cross to Calleri - on for Carroll - and the Argentine made no mistake as he slotted home via a deflection off Clayton for his side's third and the three points.
Back-to-back wins have now seen the Hammers move into the top half of the table for the first time since August. body check tags ::