Villa started confidently but was reduced to 10 men after only 17 minutes when striker Jordan Ayew was sent off for elbowing West Ham defender Aaron Creswell in the face.The extra man allowed West Ham to gain more possession at Upton Park and Michail Antonio made it count after 58 minutes, heading beyond Mark Bunn after Mark Noble's pass.
Cheikhou Kouyate secured the win five minutes before full time, completing a counterattack by reaching Enner Valencia's forward pass and lifting the ball beyond Bunn.
West Ham is sixth in the Premier League, six points from fourth, while Villa is 10 points from safety.
Former Chelsea captain Terry joins Aston Villa