Mark Nobel gave the Hammers the lead with a penalty, but Ashley Young equalised with a cross that went straight into goal.
Substitute Zavon Hines scored the 2-1 winner for West Ham in injury time.
Carlton Cole and Herita Ilunga both had to leave the pitch due to hamstring injuries.
“I’m delighted for the team because they’ve been through a difficult moment and today was difficult,” he told Sky Sports.
“We started the game very well and losing two players like Ilunga and Cole would have been a big blow for everybody but we reacted and we came up with a victory which in my opinion was well deserved.
“Their goal was an unbelievable goal, we weren’t expecting that. But we believed until the end, we fought until the end and that was the reward we got.
“I think its massive because there have been games where we have been playing well and not getting results so three points will give the boys a lot of confidence and that’s what we need right now.
“The pressure will be there, it’s just up to us to keep it apart from us.”