City were dumped out of the Carling Cup in the 4th round after throwing away a 1-0 lead to eventually succumb to the Hammers.
The Potters started the game well and took the lead in the 6th minute when Jermaine Pennant swung in a corner and Kenwyne Jones rose highest to head into the net and break the deadlock.
City nearly doubled their lead shortly after as a long ball forward from Andy Wilkinson was collected by Tuncay but the Turkish star just lost control of the ball as he shaped to shoot and the chance was gone.
The hosts rallied and Barrera rifled a shot wide whilst Begovic was there to deny Benni McCarthy but City were back forcing the initiative in the 19th minute as Tuncay got on the end of a Higginbotham cross but his bullet header flew inches wide of the near post.
The first period ended with City under pressure as Barrera saw an effort deflected wide, McCarthy miss a gilt edged chance in front of goal and Carlton Cole easily turn his marker but screw his shot wide of the goal,
City were able to regroup at the break and an early corner saw them come oh so close to doubling their advantage when Pennant pulled the ball back to Whelan. The Irishman sidefooted his shot towards the top corner but, with the keeper caught flat footed, the ball took a last minute deflection and spun wide of the goal.
The hosts were looking to get back in the game and Tomkins headed wide at a corner whilst the influential Parker blasted a shot inches wide of the post as City continued to hold on.
Victor Obinna was introduced for the home side and almost drew his side level immediately, but Begovic pulled off a marvelous full length save.
Stoke were just about holding on but that all changed on 83 minutes as a Barrera cross picked out the perfectly timed run of Parker and the England midfielder nodded past Begovic and into the net to send the home crowd crazy.
Stoke sat deeper and deeper as the 90 minutes drew to a close and were thankful for the full time whistle but 6 minutes into extra time the home side went in front as Noble burst past the Potters defence and, after getting keeper Begovic to close him down, ge squared for Manuel Da Costa to sidefoot into the empty net.
City sent defender Ryan Shawcross up front to try and force an equaliser but were caught on the break late on as Obinna surged forward and sent a rocket past Begovic and into the top corner to seal the Hammers spot in the last eight of the competition.