The Potters’ first-half dominance was reflected in centre-back Robert Huth’s eighth goal of the season, but Frederic Piquionne’s clear handball was missed by referee Mike Jones as the striker went on to score an equaliser.
When former Hammer Matt Etherington missed a penalty seconds into the second half, it seemed it was not to be Stoke’s day but Danny Higginbotham drilled a free-kick through the wall which goalkeeper Robert Green could only push onto a post and into the net.
The quarter-final itself ended up being a classic cup tie, with the hosts making all the running early on but having to survive a onslaught in the closing stages.
Had they not won, the major talking point would have been the decision to allow Piquionne’s goal but the Potters just deserved to edge it, although West Ham’s belated contribution was worthy of a mention.
Having had just over a week to reflect on their 3-0 Premier League defeat at Upton Park, Stoke came out all guns blazing from the kick-off, creating two good chances in the opening 90 seconds.
Jermaine Pennant’s right-wing delivery was missed by Jon Walters with Kenwyne Jones following up behind unable to get a decisive touch, but his second cross moments later picked out Etherington, but his powerful header was kept out by Green.
It was no surprise when Stoke took the lead in the 12th minute but what was amazing was the poor way in which West Ham failed to deal with a Rory Delap long throw.
When the ball into the six-yard area from the left touchline no-one picked up the run of centre-back Huth who planted a straightforward header past Green.
The hosts almost had a second when Walters set Jones racing through the inside-right channel but could not quite make up enough ground to reach the return ball across the six-yard box.
Stoke’s wingers Pennant and Etherington were causing all kinds of problems, the latter threatening to cut open them open again with a run from the halfway line.
The visitors were in desperate need of a route back into the game and they were literally handed it on the half-hour.
Thomas Hitzlsperger’s ball over the top saw Piquionne get beyond Huth but the striker blatantly used his upper arm to control the pass before lobbing it over Thomas Sorensen.
Stoke were outraged the goal was allowed to stand, but it was not without consequence for the scorer who soon limped off injured as a result of Huth’s challenge as he tried to prevent Piquionne applying the final touch.
A late rally saw Delap and Walters both force low saves out of Green near his left-hand post before Stoke boss Tony Pulis walked off at half-time leaving counterpart Avram Grant under no illusions of what he thought of Piquionne’s goal.
Within 13 seconds of the restart Stoke were presented with the opportunity to go ahead again when Scott Parker fouled Etherington as he tricked his way into the penalty area.
The former West Ham midfielder picked himself up but did not place the spot-kick far enough into the corner and Green dived to his left to pull off the save.
Stoke continued to look more threatening and Jones had a header cleared off the line by Carlton Cole as their domination at set-pieces continued.
When referee Jones eventually did spot a handball, Cole blocking Pennant’s free-kick, it proved to be equally as significant as the one he missed in the first half – and this time to Stoke’s benefit.
With the ball teed up just inches from the edge of the area Higginbotham smashed a low shot through the wall which was so powerful Green could only palm it on to the post and back into the net.
Substitute Robbie Keane almost surprised Sorensen with a near-post shot but where the key decision had gone for the Hammers in the first half, they enjoyed no such luck in the latter stages with James Tomkins claiming a penalty for a foul by Walters only to be penalised himself.
West Ham’s fading fortune was highlighted when Matthew Upson crashed a header against the crossbar with four minutes to go as Stoke hung on for only the fourth FA Cup semi-final in their history.