Angelo Ogbonna and Jarrod Bowen were both on target for David Moyes’ side, who fought back after a deflected Jack Grealish equaliser and were fortunate that Ollie Watkins smashed a late penalty against the crossbar before seeing a stoppage-time effort ruled out for offside in a lively encounter on Monday night.
The hosts – boosted by the return of key forward Michail Antonio following a hamstring injury – could not have made a better start, with Ogbonna towering high at a corner to head home West Ham’s fastest Premier League goal since November 2016 with only one minute and 50 seconds on the clock.
However, they failed to push on from there, with Villa recovering from a sleepy start as Trezeguet’s effort was deflected wide, Ezri Konsa headed over and Conor Hourihane – in for the injured Ross Barkley – saw a free-kick pushed around the post by Lukasz Fabianski.
The equaliser came after 25 minutes, when Grealish – quiet out on the flank – drifted inside and saw a hopeful shot take a huge deflection off Ogbonna on its way in.
Villa largely controlled the tempo of the first half thereafter, with Watkins shooting wide after an eye-catching passing move and Hourihane curling another left-footed free-kick into the side netting.
Unimpressed with that first-half decline, Moyes made two changes at the break as the ineffective Antonio and Arthur Masuaku were replaced by Sebastien Haller and Said Benrahma respectively.
And within 30 seconds that intervention paid off, with the former Brentford winger crossing for Bowen to catch Villa cold once more and head in to restore West Ham’s lead.
The visitors attempted to hit back immediately as Grealish teed up John McGinn for a low strike that was blocked by Aaron Cresswell.
Tempers flared after a foul on Grealish that brought yellow cards for Pablo Fornals and a coach from each side, including Villa assistant John Terry.