Goals by Angelo Ogbonna and Jarrod Bowen at the start of each half earned West Ham the points, although Villa will rue an Ollie Watkins penalty that rattled the crossbar.
Watkins then thought he had made amends in stoppage time but he had a goal ruled out by VAR for a marginal offside.
Jack Grealish had levelled with a deflected effort in the 25th minute but it was a frustrating night for Villa who could have gone fourth with a win.
West Ham’s third successive victory leaves them on 17 points from 10 games, four points behind leaders Tottenham Hotspur. Villa have slipped to 10th with 15 points, having played a game less.
Three weeks ago West Ham beat Fulham 1-0 at the London Stadium after a comical last-gasp penalty miss by Ademola Lookman and they got lucky again as they bagged the points, despite being second-best for much of the game.