Abbey-Leigh Stringer scored her first goal for West Ham as they overcame Aston Villa at Banks's Stadium.
Stringer scrambled home the opening goal after Hannah Hampton had dropped a corner and Jill Scott had blocked an initial shot on the line.
Alisa Lehmann equalised with a penalty after Ramona Petzelberger was brought down by Kate Longhurst.
Katerina Svitkova squeezed a second-half shot under Hampton to seal the hard-fought Women's Super League win.
The Hammers' second league win away from home this season sees them move level on points with Manchester City in sixth spot.
Hampton's inability to claim a 12th-minute corner gifted the visitors the opener and Stringers' first WSL goal in three years.
Lehmann levelled from the spot just before the break, but the hosts could only blame themselves again for West Ham's second.
Moments after Hampton came off her line to foil Claudia Walker, Svitkova put the ball between the goalkeeper's legs after claiming possession as Villa tried to play out from the back.
It took a fine saved from Mackenzie Arnold to deny Remi Allen at her near post soon after to ensure all three points for Olli Harder's side.