The England international struck just minutes after Santi Cazorla's penalty to give Arsene Wenger's men all three points at Upton Park, despite Cheikhou Kouyate's headed goal.
Santi Cazorla first netted from the penalty spot in the 41st minute before Danny Welbeck converted Alex Oxlade-Chamberlain’s cross just three minutes later.
|VIEW FROM UPTON PARK
|By Reda Maher
On a clear but freezing day in East London, Arsenal had to roll up its sleeves to get a victory at West Ham. This was a match of huge importance to both teams – could the overachieving Hammers get back on the horse after their defeat to Chelsea, and did Arsenal have it in it to battle to a second London derby win in under 48 hours?
The answers ran “no” and “yes”, but West Ham will be encouraged by being the better side for most of the match, while Arsenal can't let six points in two festive matches paper the cracks of a lopsided squad.
Ultimately the victory puts Arsenal in a good position going into the new year, outside the top four on goal difference, but to become genuine contenders the Gunners still need two or three key signings.
The result sees Arsenal go fifth, two points clear of West Ham, which now sits sixth.
Alex Song returned to captain West Ham against his former club, as Allardyce made five changes to the side that lost 2-0 at Chelsea on Friday, and the midfielder had the ball in the back of the net after five minutes.
The former Gunner lashed home from 25 yards when the ball fell to him from a corner, but the effort was ruled out after the linesman deemed Diafra Sakho to be in an offside position on the edge of the six-yard box.
Arsenal, which made three changes from its 2-1 win over QPR, struggled to find its feet in the early stages, and West Ham had appeals for a penalty waved away soon after the disallowed goal when Sakho went down under the challenge of Mathieu Debuchy.
Sanchez twice went close as the visitors improved, but James Tomkins squandered a golden opportunity to mark his 200th West Ham appearance with a goal when he lifted the ball over the crossbar from a Stewart Downing cross.
He was soon made to rue that miss, when a falling Reid caught Cazorla as he charged into the penalty area – the Spaniard burying the resulting spot kick in the bottom left-hand corner of the net.
Arsenal made it two just three minutes later, with Welbeck sliding in to convert an Alex Oxlade-Chamberlain cross after a neat passing move.
Carroll headed narrowly over as West Ham looked to reduce the deficit at the beginning of the second half, but Kouyate had more success in the 54th minute as he nodded in off the head of Debuchy from a Tomkins cross.
Adrian got down brilliantly to his left to prevent Cazorla re-establishing the two-goal advantage soon after, before Reid tested Wojciech Szczesny with an improvized effort from 25 yards at the other end.
Welbeck came close to a brace when he drilled wide after charging down the left wing, and Adrian was forced into excellent saves from Oxlade-Chamberlain and Sanchez late.
Wenger will be grateful to come away from Upton Park with the three points, though, as his side was forced to cope with sustained injury-time pressure from the home side, culminating in Enner Valencia heading just over shortly before the final whistle.