West Ham started the brighter of the two teams with Andy Carroll firing in on goal after just five minutes – but his powerful effort was well stopped by Ben Foster.
After early pressure from the Hammers, the Baggies broke on the counter-attack in devastating style and after being fed through by Stephane Sessegnon, winger Morgan Amalfitano fired into the path of Berahino – who hit it high into the Irons goal to make it 1-0.
Sam Allardyce’s side has chances to level the scores in the first half, but Foster kept out attempts from Guy Demel and Carroll – the latter being a superb save from just six yards out.
In the second half, the Baggies keeper watched on in hope as Carroll clattered the bar with a strong header whilst at the other end, Albion scuppered numerous opportunities to double the lead – with both sides guilty of poor finishing.
However, West Brom managed to hold on for a hugely valuable three points that takes them above local rivals Aston Villa and into 15th place on 36 points, just one point off the Hammers.
The visitors looked likely to open the scoring and Carroll – the threat of whom Pepe Mel had made particular reference to in the build-up to the contest – cracked a shot goalwards from Kevin Nolan’s lay-off in the sixth minute which Foster saved.
There was a further warning from West Ham moments later when Matt Jarvis put a delivery into the dangerzone and the West Brom defence did just about enough to clear the ball away.
Against the run of play, Sessegnon burst forward and slid the ball to Amalfitano, who had plenty of time and space on the right of the box to tee-up Berahino’s finish.
The England Under-21 international was just inches from the line as he prodded the ball over it for his ninth West Brom goal of the season, on what was his first start for the club in eight games.
West Ham continued to push forward, with Carroll seeing a volley take a deflection and get cleared behind, before bringing a great diving save out of Foster with a firm header from Mohamed Diame’s cross.
West Brom’s response was a headed effort from Billy Jones, who threw himself at Amalfitano’s cross but could only send the ball wide.
There were further nervy moments for the hosts as Foster got away with a risky-looking sliding tackle on Jarvis outside the box before the England goalkeeper made another reaction save during a scramble inside it.
Almost immediately, Albion were back on the attack as Sessegnon and Graham Dorrans broke forward, but the latter could only fire wide from the edge of the area.
West Brom had to make a reshuffle themselves due to injury as Steven Reid limped off for James Morrison just before the break.
They enjoyed a spell of pressure after the interval, with Sessegnon twisting and turning before striking into the side netting, Adrian getting down to save Jones’ low shot and Dorrans dragging an attempt wide.
Sessegnon, who was appearing as much in the mood for the game as the vociferous Albion fans, tried to feed Berahino twice in quick succession, with the 20-year-old striker miscontrolling first time around and then on the second occasion producing a shot that rebounded off Adrian’s legs.
Soon after, Berahino lost control in front of goal once more as Youssouf Mulumbu’s ball came through to him.
West Brom were almost ruing those missed opportunities when Carroll met a corner and powered a header against the crossbar.
Adrian was then in action again, saving well from a drilled Sessegnon effort.
Baggies fans were taking nothing for granted in the closing stages following recent results.
But they were celebrating come the final whistle, just like Mel as he savoured the winning feeling on home turf for the first time since his appointment in January.