Salah, who has not been at his best since returning from injury last month, was brought on in the 79th minute, just after the Hammers' second goal levelled the game
Villa took the lead after 74 seconds when Bertrand Traore pounced on a loose back pass by full back Cedric Soares and cut the ball back to Ollie Watkins, whose first time effort was deflected past Arsenal's debutant goalkeeper Mat Ryan.
Arsenal's best opportunity to score an equaliser came from a Granit Xhaka free kick which looked destined for the top corner until their own former goalkeeper Emiliano Martinez at full stretch pushed it around the post with a fingertip save.
While Villa leapfrogged struggling Tottenham Hotspur, the result left Arsenal in 10th with 31 points, two points behind their north London rivals having played two games more.