Stoke were on course for three points in their battle against relegation when substitute Peter Crouch pounced after Joe Hart spilled Xherdan Shaqiri's shot to put his side ahead on 79 minutes.
As a result, Crouch is now Stoke's leading Premier League goalscorer with 44 goals.
But West Ham, who earlier had two goals ruled out for offside, piled on the pressure and Carroll volleyed into the bottom corner from Aaron Cresswell's cross.
West Ham stay 14th, on 35 points, seven clear of the relegation zone. Stoke remain in the bottom three, five points from safety.
West Ham: 22 Apr v Arsenal (A)
Stoke City: 22 Apr v Burnley (H)