Alexandre Lacazette came off the bench to score the winner, but the goal was only given after VAR over-ruled the original offside decision.
We had toiled all afternoon against a resolute Hammers side, but made the breakthrough when Mesut Ozil headed Pierre-Emerick Aubameyang's pass back across goal for Lacazette to smash home.
The flag was up against Ozil, but VAR replays showed he was just - just onside.
But for large parts of the game we didn't manage to test former Gunner Fabianksi in the West Ham goal at all, indeed it was the visitors who came closest in a fairly dour opening 45 minutes.
Jarrod Bowen hit the post with a low shot which Bernd Leno just about got something on to deflect on to the frame of the goal, while Mesut Ozil had our best chance, but his shot in the box was charged down.
There as a real let off when Michail Antonio and Sebastien Haller broke to isolate David Luiz in the box, but Antonio's cut back was just behind his striking partner, who was all alone in front of goal waiting for a tap in.
Antonio also missed from close range late on in the half, but for all our domination of the ball, we had yet to look particularly dangerous in possession.
A moment of invention by Bukayo Saka carved out our first chance of the second half - for Eddie Nketiah - but Fabianski was out quickly to smother the shot.
Antonio again found himself unmarked in the box, but Leno came up with a big save to keep out his header.
We were living dangerously at the back, while looking timid in attack – Mikel Arteta called for Lacazette.
And it was the substitute who broke the deadlock, but he was made to wait to celebrate his seventh of the season while VAR overturned the original offside decision against creator Ozil.
From then on we dug in to keep the clean sheet and secure three valuable points.
HOW IT HAPPENED
WHAT IT MEANS
Next up we travel to Manchester City to take on the champions at the Etihad Stadium in a 7.30pm (UK time) kick off in the Premier League. This is our game in hand after the fixture was postponed last weekend when City were playing in the Carabao Cup final.
Copyright 2020 The Arsenal Football Club plc. Permission to use quotations from this article is granted subject to appropriate credit being given to www.arsenal.com as the source.