With both clubs in the relegation zone before kick-off, the contest was an all-important six-point affair.
It was the visitors who took the lead after half an hour when James McClean's free-kick was deflected past Adrian.
Jeers from the Hammers crowd must have spurred on David Moyes' men as they returned in the second-half with a much improved attitude.
Carroll was unlucky not to put West Ham ahead just a minute after the restart when he failed to convert Marko Arnautovic's superb cross.
The Englishman would have wait another 13 minutes before breaking the longest goalscoring drought of his career, and he did so in trademark fashion as he rose above Baggies duo Kieran Gibbs and Jonny Evans to head home the equaliser.
With the game entering its final seconds, Arnautovic delivered another teasing cross into the box but this time Carroll finished neatly to send the home crowd into hysterics.
The goals represented Carroll's first since April, and speaking after the game, the 28-year-old was relieved to get back on the scoresheet.
"It has been a while, it has been a while since I started, but it was good to get on the pitch and get a goal and I am obviously relieved," said Carroll.
"It was a tough game. We are disappointed with the goal we have gave away, but we had to keep the ball and keep pushing them and we did that and got the goals.
"It was tough, I was tired at the end, but if I didn't get into the box at the end I would have been given some stick by the staff.
"We are on a decent run and the fans deserve that."