The Hammers held basement team Pompey 1-1 at Fratton Park, with skipper Matthew Upson giving the visitors the lead after 52 minutes.
But Webber’s 75th-minute goal just two minutes after replacing Frederic Piquionne kept his side’s hopes of top flight survival alive.
The game exploded into life after 20 minutes and Asmir Begovic needed to be at his best to keep Pompey on level terms, when Frank Nouble stormed through on goal.
The Serb flew to his left to save the Hammers hitman’s effort and diverted Valon Behrami’s follow-up wide.
Pompey charged straight down the other end and Green needed to be at full stretch to turn a drive from Utaka wide seconds later.
Boateng’s corner found Frenchman Younes Kaboul, whose volley was scrambled off the Hammers line.
On 52 minutes West Ham scored. Pompey cleared an Alessandro Diamanti corner from the right, but the Italian curled the ball back to the far post. Skipper Matthew Upson leapt high to divert the ball past Begovic with his chest.
Pompey boss Avram Grant introduced striker Webber for the final 17 minutes, and the ex-Manchester United man made an almost instant impact.
Boateng headed the ball down for Utaka, who slotted Webber in beautifully to coolly pass the ball under Green and net his first Premier League goal for Portsmouth.
PORTSMOUTH: Begovic, Kaboul, Hreidarsson, Finnan, Mokoena, Mullins (Vanden Borre 64), Utaka,
Boateng, Basinas, Wilson, Piquionne (Webber, 73)
WEST HAM UNITED: Green, Upson, Spector, Tomkins (Da Costa, 80), Kovac, Noble, Faubert, Behrami, Collison, Nouble (Cole, 74), Diamanti (Stanislas, 87)
Referee: A Marriner.