Angelo Ogbonna opened the scoring after just two minutes on Monday night, before Jack Grealish got the visitors back in it just before the half-hour mark.
It was another quick start in the second half as Jarrod Bowen headed home after just 28 seconds, before Ollie Watkins struck the crossbar from the penalty spot.
The Villa striker thought he had earned a point in added time before a lengthy VAR check ruled him offside by the narrowest of margins.
Here is how Jack Rosser rated West Ham’s players on the night…
Good stop from a Conor Hourihane free-kick in the first half and a brilliant instinct save from Trezeguet in the second.
Continues to impress at the back having come in from the cold earlier this season. Dealt with Watkins well for the most part.
Brilliant header to open the scoring early on, rather unfortunate with the deflection off his boot for Grealish’s goal.
Showed he’s still got more than enough about him to play left-back as well as in a three after Moyes switched to a back four for the second half.
Had a difficult night up against Jack Grealish, embarrassed on a couple of occasions but another decent display.
Not his best showing, a big let-off from Watkins after Rice had tugged on the shirt of Trezeguet inside the box.
One of the Czech’s quieter games but continues to work harder than most and covers so much ground.
Maybe a little unfortunate to be taken off at the break, got into some decent enough positions down the left but a victim of the change in shape.
All action for the Hammers, stepping up when Antonio was quiet. Brilliant delivery to set up the opener and showed great instinct and drive for his goal.
Didn’t offer too much going forward but gave Coufal a big helping hand with Grealish.
Back in after his hamstring injury but didn’t look sharp at all. Struggled to stretch the Villa back line and had little joy holding it up too. Rightly hooked at the break.
Made such a difference after coming on at the break, unlucky not to keep his spot in the starting XI after scoring last week but more than made up for it.
Made an instant impact off the bench with an assist for Bowen within 30 seconds, caused Matty Cash plenty of problems and made a real case to get a start against Manchester United.
Subs not used: Lanzini, Diop, Johnson, Randolph