The Jamaica international scored the only goal in what was our first match in five weeks following the winter break – her ninth in the WSL and 12th in all competitions.
By scoring at the Chigwell Construction Stadium, the 25-year-old is now at the chart's summit.
The win also saw us move further away from the hosts in the table and cut the gap to three points from Arsenal in third, and extend our unbeaten run to 11 games.
Chances were few and far between in the opening stages despite City dominating possession, before Chloe Kelly, who was celebrating her birthday in the capital, carved out our first opportunity.
The electric attacker’s whipped, pinpoint free kick from the right fell at the feet of Alanna Kennedy who, off balance, did well to direct an effort at goal which Mackenzie Arnold gratefully held.
The hosts came into the game looking to close the gap on the Blues who sat one place above them in the league coming into the fixture in Dagenham.
And, against the run of play, the Hammers should’ve gone ahead after goalmouth scramble saw us somehow avert Viviane Asseyi’s poked effort away from the line after the ball looked certain to find the back of the net.
Paul Konchesky’s side understandably grew in confidence after coming close to breaking the deadlock and limited City’s chances in front of goal.
But Shaw, who was aiming to add to her tally of eight league goals and climb back to the top of the scorers charts, came close with two efforts on the stroke of half-time.
The first saw her collect the ball with her back to goal, turn her marker but unfortunately fire over from the edge of the box, before heading above the bar after another Kelly cross moments later.
Deep in first half stoppage time, Ellie Roebuck kept the scoreline goalless with a magnificent save when Risa Shimizu broke free and let fly from close range which our 'keeper strongly palmed away.
Following the interval we were fast out the blocks and notched the game’s decisive goal through Shaw.
In typical City fashion, a neat move orchestrated in midfield saw Yui Hasegawa and Deyna Castellanos combine, with the latter then nudging the ball into the Jamaican’s path, allowing her to round the goalkeeper and fire into an empty net.
After taking the lead, Taylor's side dictated the tempo and maintained a high percentage of possession without creating too many chances, while keeping West Ham at bay.
Alex Greenwood was playing her first match for City since signing her new contract in December and she almost secured the points with 10 minutes remaining.
Kelly once again dangerously hung a corner towards the back post where our versatile defender's close-range header flew just wide of the post.
In the closing stages, Shaw almost doubled her tally when she showed her strength to shrug off a challenge to break into the box but her low effort came back off the post.
That proved to be the final action of the match as we held on for three points and claimed our fourth WSL clean sheet of the season.
PLAYER OF THE MATCH: ALANNA KENNEDY
In what was the Australia international’s first WSL start of the season, the centre-back produced an immense display.
The 27-year-old commanded the backline expertly and consistently read the danger to thwart the hosts.
Not only did she showcase her defensive capabilities, she was also calm on the ball and continually delivered inch-perfect passes, often starting attacks.
WHAT IT MEANS
Victory against West Ham means City now have 22 points so far this term but remain in fourth spot – cutting the gap to third-placed Arsenal to three points.
HOW WE LINED UP
Ellie Roebuck started in goal and was protected by a back four of Esme Morgan, Alanna Kennedy, Alex Greenwood and Leila Ouahabi.
Our midfield was anchored by Yui Hasegawa with Deyna Castellanos and Laura Coombs operating slightly further forward than the Japan international.
And our front three consisted of Chloe Kelly and Lauren Hemp either side of Khadija ‘Bunny’ Shaw.
City XI: Ellie Roebuck, Esme Morgan, Alanna Kennedy, Alex Greenwood, Leila Ouahabi, Yui Hasegawa (Laia Aleixandri 89'), Deyna Castellanos, Laura Coombs, Chloe Kelly, Khadija Shaw, Lauren Hemp.
Substitutes: Sandy MacIver, Steph Houghton, Mary Fowler, Filippa Angeldahl, Vicky Losada, Ruby Mace, Julie Blakstad.
West Ham XI: Mackenzie Arnold, Risa Shimizu, Kate Longhurst (Emma Snerle 57’), Grace Fisk, Kirsty Smith, Dagný Brynjarsdóttir, Abbey-Leigh Stringer, Honoka Hayashi, Lisa Evans (Isibeal Atkinson 81'), Viviane Asseyi, Hawa Cissoko.
Substitutes: Melisa Filis, Brooke Cairns, Sophie Hillyerd, Halle Houssein, Keira Flannery
City return to Continental Cup action against Leicester on Wednesday 18 January.
We travel to the Pirelli Stadium with kick-off scheduled for 19:00pm (UK) in what represents our final Group B fixture.
Taylor’s side are all-but through to the knockout stages and know avoiding a heavy defeat will be enough to confirm our spot in the last-eight.
News about West Ham v Man City
Taylor delighted by 'really important' West Ham win
Gareth Taylor believes our 1-0 triumph away to West Ham puts City 'back amongst' the Barclays Women's Super League title race. Watch more
Full-match replay: West Ham v City
Relive every kick of our Barclays Women's Super League clash with West Ham on CITY+ and Recast. Watch more
West Ham 0-1 City: Barclays Women's Super League highlights
The best of the action as City begin 2023 with a hard-fought triumph against the Hammers. Watch more