Saido Berahino’s first-half goal took Albion a giant step towards Premier League safety as they claimed their first home win under Pepe Mel.
The young striker was recalled to the starting line-up and prodded home Morgan Amalfitano’s cross-shot in the 11th minute to settle an intensely nervous game.
The Baggies fans suffered an excruciating afternoon and the Hammers had chances, not least when Andy Carroll headed against the bar in the second half.
But they held on for a priceless win to move to 36 points.
Albion made a nervous start and offer the visitors some early encouragement.
First a Mark Noble free-kick glanced dangerously off the head of Steven Reid and drifted just past the far post for a corner.
Then a cross by Matt Jarvis forced Billy Jones and Jonas Olsson into some crucial last-ditch defending to deny Andy Carroll.
But it was the hosts who went ahead in the 11th minute when Stephane Sessegnon ghosted past James Tomkins and fed Morgan Amalfitano, who drilled in a low cross-shot that was turned in from close range by Berahino.
The Hammers continued to threaten with Carroll looking especially dangerous.
He saw a half-volley from a Stewart Downing cross blocked by Craig Dawson before seeing a header from a Guy Demel centre saved brilliantly by Ben Foster.
But the Baggies had two good chances to double their lead.
First Billy Jones burst forward from left-back and headed just wide from a superb Amalfitano cross.
And then Graham Dorrans dragged a shot just off target after a pacy break by Sessegnon.
Foster then made another smart block at his near post to keep out a low shot from Mohamed Diame.
Albion began the second half on the front foot and Adrian made a smart save low down early on from Jones.
And the Baggies should have doubled their lead on two occasions.
First there was chaos in the Hammers defence as Sessegnon broke and fed Berahino, but the youngster failed to get a shot away and Adrian then saved from Sessegnon.
And then a poorly-hit long-range shot from Youssouf Mulumbu broke for Berahino, who could not get it under control and prodded the ball straight to Adrian.
But the Hammers should have been ahead when Carroll escaped the attentions of Albion’s defenders to connect with a free header from a Jarvis corner but his effort struck the crossbar.
There was a tense finale as the Hammers launched long balls towards the home goal and the Baggies lived on their nerves, but they held on for a priceless win.Subscribe to our Newsletter