Mohamed Diame's excellent solo goal gave the Hammers the lead but Wenger's side rallied impressively, equalizing just before halftime before converting their dominance late on
Mohamed Diame opened the scoring against the run of play, brilliantly beating Aaron Ramsey and curling into the top corner before Olivier Giroud displayed his predatory instincts by stabbing home Lukas Podolski's low cross.
And he later turned provider as he threaded Walcott in on goal for the 23-year-old to put the Gunners ahead, before Cazorla thundered a 20-yard effort in to seal all three points.
Arsene Wenger shuffled his pack following Wednesday night's 3-1 win over Olympiakos, recalling Giroud and Aaron Ramsey as well as bringing Per Mertesacker in to help counter the threat of Andy Carroll, who was given a start ahead of Carlton Cole by Sam Allardyce.
Giroud, who was still chasing his first Premier League goal, tested Jussi Jaaskelainen at his near post in the second minute and this early chance fostered a dominant opening 20 minutes for Wenger's team.
However, on a rare break forward for the hosts, George McCartney advanced from left back and rolled a ball into Diame's feet. The powerful Senegalese midfielder sized up Ramsey before knocking the ball past him as the Welshman pressed too tightly. From almost the byline and inside the box, Diame's next touch was of the highest quality as he bent a rising shot past Vito Mannone and into the top corner.
Diame though, had picked up a booking for celebrating with the home support, and was very fortunate not to receive his marching orders on the 28th minute as he clattered into Mikel Arteta in midfield.
The 25-year-old did survive a dismissal but he was the villain as he tried to pluck a ball out from the sky on the halfway line. Arteta pounced and Giroud swept the ball wide to Lukas Podolski who took a touch before delivering a splendid low cross into the six-yard box for the waiting Frenchman to poke home.
The halftime break helped West Ham recuperate its lost momentum and although Arsenal remained in control of possession, the Hammers appeared more direct and threatening. Matt Jarvis half-volleyed over the bar before Carroll leapt above Mannone but could only nod wide of an empty goal when he should have scored.
The game was pockmarked by injuries to Ricardo Vaz Te, Guy Demel and Per Mertesacker and it was a wonder that Mannone came away unscathed after several bruising collisions. But he will be pleased to have witnessed the closing stages as Arsenal turned the screw.
First, Giroud sent substitute Walcott in on goal, leaving the England international the space to calmly slot low past Jaaskelainen with 13 minutes remaining. As the Hammers pressed for an equalizer, Walcott stole possession and handed the ball to Cazorla, and he composed himself before rifling an unstoppable 20-yard shot into the top corner.
With that, Wenger's team had averted a potential banana skin and sealed a valuable three points in an impressive comeback.