The South African, making his first start in seven months, completely missed his kick from Cole's cutback.
Following a hapless first-half display the Hammers looked far from likely winners, but it was three second-half substitutions by boss Avram Grant which swung the match back in his side's favour.
The hosts could have levelled in the 54th minute when Stoke goalkeeper Asmir Begovic flapped at Barrera's corner and James Tomkins put a diving header just wide.
That led to Grant replacing Radoslav Kovac with Obinna after 64 minutes, and Valon Behrami came on for Luis Boa Morte eight minutes later.
But it was the introduction of Mark Noble, who came on for the ineffective McCarthy after 72 minutes, that really changed the game.
Noble gave captain Parker some much-needed support in midfield and the two combined well to win the battle for possession.
West Ham pushed forward in search of an equaliser and peppered the Stoke City goal with crosses as the Upton Park faithful roared their approval.
The home supporters then thought they should have had a penalty when Stoke defender Ryan Shawcross tangled with Julien Faubert in the box, but referee Howard Webb decided the English defender had timed his tackle well.
But the fans' anger was soon assuaged as the inspirational Parker nodded home Barrera's inswinging cross from close range and sent the game into extra time.
Noble then waltzed past a static Stoke defence to give the Hammers the lead as he crossed for Da Costa to sweep home from seven yards.
And he then put Obinna through with a magnificent slide-rule pass to wrap up the win with two of the 120 minutes remaining.
West Ham manager Avram Grant: "When substitutes succeed, I am happy.
"We didn't start the game well but the reaction in the second half was great. We played well, we dominated the game, and we scored three goals.
"Even, the first half, we were playing well. We had two good chances in the last 10 minutes of the first half.
"I thought if we continued to play like this, we would win the game."
Stoke City manager Tony Pulis: "We're disappointed. We thought we played well first half.
"I thought we had more opportunities. Our final pass was poor but we needed that second goal.
"West Ham threw everything at us in that second half, as you'd expect.
"We worked very, very hard for a good 75 minutes today and we tired a little bit at the end - but I have got to give them credit."
54:59 Substitution Danny Pugh joins the action as a substitute, replacing Jermaine Pennant.
53:21 Inswinging corner taken by Pablo Barrera from the left by-line played to the near post, James Tomkins produces a header from
deep inside the six-yard box which goes wide of the right-hand upright.
48:52 Glenn Whelan takes a shot. Julien Faubert gets a block in. Jermaine Pennant takes the inswinging corner, Luis Boa Morte manages
to make a clearance.
47:52 Corner taken by Jermaine Pennant from the right by-line to the near post, clearance made by Carlton Cole.
46:45 Tal Ben-Haim concedes a free kick for a foul on Andy Wilkinson. Jermaine Pennant crosses the ball in from the free kick, James
Tomkins manages to make a clearance.
45:01 The referee blows his whistle to start the second half.
45:00+1:48 The half-time whistle blows.
45:00+1:08 Corner from the left by-line taken by Pablo Barrera, Manuel da Costa has a header from inside the six-yard box and clears
44:48 Pablo Barrera takes a shot. Blocked by Robert Huth.
41:24 Scott Parker gives away a free kick for an unfair challenge on Glenn Whelan. Asmir Begovic takes the free kick.
39:26 Effort from inside the area by Carlton Cole misses to the right of the target.
37:02 James Tomkins challenges Kenwyne Jones unfairly and gives away a free kick. Dean Whitehead takes the free kick.
32:04 Carlton Cole gives away a free kick for an unfair challenge on Dean Whitehead. Dean Whitehead takes the free kick.
31:06 Pablo Barrera takes a shot. Glenn Whelan gets a block in. Inswinging corner taken right-footed by Pablo Barrera, James Tomkins
has a headed effort from close range and clears the crossbar.
30:43 Free kick awarded for a foul by Jermaine Pennant on Luis Boa Morte. Free kick taken by Tal Ben-Haim.
27:25 Glenn Whelan takes a shot from deep inside the box clearing the bar.
21:58 Shot from just outside the box by Scott Parker goes over the target.
17:57 Tuncay Sanli has a headed effort at goal from just inside the box that misses to the left of the goal.
17:08 Jermaine Pennant gives away a free kick for an unfair challenge on Tal Ben-Haim. Free kick taken by Marek Stech.
15:43 Free kick awarded for an unfair challenge on Jonathan Walters by Pablo Barrera. Direct free kick taken by Dean Whitehead.
14:08 Foul by Luis Boa Morte on Jermaine Pennant, free kick awarded. Jermaine Pennant crosses the ball from the free kick right-footed
from right wing, blocked by Scott Parker.
12:31 Effort from just outside the box by Pablo Barrera goes over the bar.
11:59 Dean Whitehead gives away a free kick for an unfair challenge on Luis Boa Morte. Direct free kick taken by Scott Parker.
10:42 The referee blows for offside. Indirect free kick taken by Marek Stech.
9:36 James Tomkins fouled by Tuncay Sanli, the ref awards a free kick. Direct free kick taken by James Tomkins.
Correction - 5:38 Assist on the goal came from Jermaine Pennant.
Correction - 5:38 GOAL - Kenwyne Jones:West Ham 0 - 1 Stoke Kenwyne Jones finds the net with a headed goal from inside the penalty box. West Ham 0-1 Stoke.
5:38 The assist for the goal came from Jermaine Pennant.
5:38 GOAL - Kenwyne Jones:West Ham 0 - 1 Stoke Goal scored by Kenwyne Jones from deep inside the penalty area to the bottom right corner of the goal. West Ham 0-1 Stoke.
Correction - 4:55 Inswinging corner taken by Jermaine Pennant from the left by-line,
4:55 Corner taken by Jermaine Pennant from the left by-line,
3:50 Free kick awarded for a foul by Dean Whitehead on Scott Parker. Scott Parker takes the free kick.
3:29 Luis Boa Morte challenges Andy Wilkinson unfairly and gives away a free kick. Direct free kick taken by Andy Wilkinson.
2:20 Jermaine Pennant gives away a free kick for an unfair challenge on Scott Parker. Direct free kick taken by James Tomkins.
0:25 Kenwyne Jones challenges Radoslav Kovac unfairly and gives away a free kick. Free kick taken by Manuel da Costa.
0:00 The match begins.
Live text and data provided by The Press Association.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.