Carlton Cole gave West Ham a surprise lead early in the second half before Walcott scored a fortuitous equaliser and then headed Arsenal in front.
Substitute Lukas Podolski, who created Walcott’s second goal, then scored the third on his comeback from injury, as Arsenal ended a run of five games without victory in all competitions.
Walcott’s first benefited from an uncertain dive by West Ham goalkeeper Adrian, but the England winger has now scored in his last four league appearances against West Ham.
It was Arsenal’s seventh consecutive victory over their London rivals and sent Sam Allardyce’s side into the bottom three.
Arsenal made one change to the team that had drawn 0-0 with Chelsea on Monday, with Santi Cazorla replacing Tomas Rosicky in midfield.
West Ham made four changes to the team beaten 3-1 by Manchester United, including the return from a three-match suspension of captain Kevin Nolan.
Carlton Cole, a scoring substitute at Old Trafford, started this time, as did Joe Cole and Joey O’Brien.
James Tomkins, meanwhile, was available for the Hammers despite being charged with assaulting a police officer, resisting arrest and being drunk and disorderly at an Essex nightclub on Sunday.
West Ham tried to feed Matt Jarvis on the left when possible in the early stages, but one cross that Wojciech Szczesny punched away was their only threatening moment in the first 10 minutes.
After that Arsenal began to dominate, and Adrian made a flying save from a header by Cazorla.
West Ham’s response had been limited: a swerving free-kick by Mark Noble that forced Szczesny to palm the ball away and a shot from Mohamed Diame that Szczesny only caught at the second attempt.
After 26 minutes, Walcott escaped George McCartney to run onto Aaron Ramsey’s floated pass, but, unchallenged, he volleyed past the post with only Adrian to beat.
Now it seemed to be the Arsenal attack against the West Ham defence.
Giroud reacted too late as Mezut Ozil pulled the ball back across goal, Mikel Arteta volleyed just wide, and Olivier Giroud failed to connect with a low cross from Kieran Gibbs.
But West Ham also made a good opening when Mark Noble lifted a quick free-kick over the Arsenal wall, only for Nolan to fail to make decent contact.
It was a warning to Arsenal to take their chances, but they did not heed it and in the first minute of the second half, West Ham took the lead.
Arteta’s clearance fell into the path of Nolan, who was allowed to shoot unchallenged from 20 yards. Szczesny could not hold the ball and Cole smacked home the rebound.
Szczesny made up for that by blocking Jarvis’s shot on the turn, but he was nowhere as Joey O’Brien stole in unmarked to glance a header just wide.
Soon, however, Arsenal were camped in the West Ham half. Adrian parried from Cazorla, then somehow got in the way of Mezut Ozil’s follow-up effort.
In the 68th minute, the pressure finally told.
Walcott cut in from the right and tried a left-foot shot that found its way in past two defenders and through the hands of the unsighted Adrian.
Three minutes later, Podolski’s cross from the left took a slight deflection off the forehead of Tomkins at the near post and Walcott reacted more quickly than the defenders to head firmly home.
Eleven minutes from time, Giroud nudged Walcott’s right-wing cross back into the path of Podolski, who smashed the ball past Adrian from 18 yards.