Diego Tristan and Matthew Upson celebrate the Spaniard's crucial strike
Diego Tristan popped up five minutes from full-time to grab only his second goal in a West Ham shirt and snatch a barely deserved point at Aston Villa.
Emile Heskey's early goal, bundled in after good work by James Milner, had looked like settling an absorbing tie.
But Tristan flicked in Kieron Dyer's wayward shot late on to save West Ham.
It left Villa to rue their profligacy after they had failed to turn dominance into goals, Heskey and Ashley Young going closest when they hit the post.
And home supporters will also point to referee Rob Styles's failure to give a penalty at the death when James Tomkins appeared to clearly handle in the box under pressure from John Carew.
The result leaves Aston Villa without a win in eight Premier League matches and their remote hopes of securing fourth spot and Champions League football in tatters.
'Fantastic game' frustrates O'Neill
And although the last-gasp nature of the draw will please Hammers boss Gianfranco Zola, a point does little to pull West Ham clear of their rivals for seventh place in the league and the resulting qualification to the rebranded Europa League that comes with it.
It could have all been different, though, had Junior Stanislas made the most of two early chances for the Hammers.
First the youngster burst through a staid Villa backline to leave himself with only Brad Friedel to beat, only for the keeper to deflect his effort wide, and then the midfielder was denied by a desperate saving tackle from Milner when clear in the box moments later.
However, a David di Michele clipped effort aside, the rest of the half was dominated by a home side finally getting back into their stride after a crippling dip in form in recent weeks.
Gareth Barry had already gone close with a glancing header when Heskey - on his return to the side after a hamstring injury - bundled in Milner's cross from close range for the opener, and Villa kept knocking at the door thereafter.
Milner saw his goalbound long-ranger deflected wide, Ashley Young clipped the outside of the post with a left-footed shot from 20 yards and Heskey then struck the upright again when he lifted Mark Noble's woeful backpass over Robert Green on to the post.
A measure of Villa's dominance could be drawn from Hammers boss Zola's decision to replace defender James Collins with Dyer on the half hour and reshuffle his side, with Lucas Neill dropping back to right back and Tomkins coming inside.
Not that it put the hosts off their stride, and West Ham were again grateful to Green for keeping them in it after the break, the keeper denying Heskey from point-blank range after Carew's scooped pass had set his strike partner clear.
Still, with only a goal in the game, West Ham were never out of it and as a second half far tamer than the first drifted towards the final whistle, the Londoners slowly got back in the game.
Zola praises Hammers team spirit
Noble was the Hammers' driving force, and he came close to finding the equaliser when his 12-yard shot was blocked, sparking a goalmouth scramble that ended with Friedel desperately collecting under pressure from Luis Boa Morte.
It looked like the Londoners' rally would come to nothing, though, until Tristan expertly steered home from close range from a Dyer shot that looked to be flying wide.
And the Hammers almost grabbed a winner when Noble's deflected effort was desperately tipped over from almost under his own bar by Friedel.
There was still time for a huge slice of controversy, though, as Villa earnestly appealed for a penalty when Tomkins clearly handled, but referee Styles was unmoved and the match ended all square.
Aston Villa manager Martin O'Neill:
"It definitely feels like two points dropped. We created so many chances but the ball just wouldn't fall for us.
"We gave everything we possibly could but at 1-0 West Ham were always in it and they've snatched a point in the end. We've played well, provided plenty of entertainment, but at the end of the day it's a results business and we suffered for not converting our chances.
"It came down to the fact we couldn't get that elusive second goal. However, the Tomkins handball at the end was a clear, clear penalty and that would have given us a valuable three points.
"The games are running out now so this is clearly a bad blow in our bid to reach that fourth spot."
West Ham boss Gianfranco Zola:
"I'm delighted with a point. It was a very entertaining game and there were chances at both ends.
"We had a couple of chances, and conceded a lot of chances too, but it was that sort of game - wonderful.
"We are down to our bare bones - much like a lot of this season - but I don't complain. At the end of the day perhaps I should be happy with a point."
Friedel, Luke Young, Davies, Cuellar, Shorey, Milner (Gardner 81), Petrov, Barry, Ashley Young, Heskey (Delfouneso 71), Carew.
Subs Not Used: Guzan, Sidwell, Knight, Salifou, Reo-Coker.
Ashley Young, Petrov.
Green, Tomkins, Upson, Collins (Dyer 33), Ilunga, Neill, Boa Morte, Stanislas (Nsereko 74), Noble, Di Michele (Sears 81), Tristan.
Subs Not Used: Lastuvka, Lopez, Payne, Hines.
Noble, Boa Morte, Upson.
Rob Styles (Hampshire).
BBC Sport Player Rater man of the match:
Aston Villa's Brad Friedel 7.65 (on 90 minutes).
Please note that you can still give the players marks out of 10 on BBC Sport's Player Rater after the match has finished.
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.