The Hammers, poor by David Moyes’ own admission for most of the afternoon, scored twice in the space of five minutes to snatch victory away, with Tomas Soucek hitting a superb volley to win it in the first minute of stoppage-time.
It was a seventh-straight home defeat for Burnley to start the season and leaves them bottom of the table with just four points from 13 games.
“You can say that,” Kompany said with a rueful laugh when asked if this was the hardest one yet of Burnley’s 11 defeats.
“It’s what makes this game beautiful but also what makes this game hard.
“There’s no other way to say it. Today was a tough one to take but I’ve mentioned it before, it’s still a universal recipe, you’ve got to get back up and keep going.”
Burnley had led through Jay Rodriguez’s 49th-minute penalty after Luca Koleosho had been tripped by Mohammed Kudus and West Ham, without the injured Jarrod Bowen and Michail Antonio, rarely threatened to get back into the game.
But that all changed in a frantic finish as Kudus atoned for conceding the penalty by setting up the equaliser, with his cross deflected in by Dara O’Shea for an own goal and then picking out Soucek to strike the winner.
“You have to play until the end but in minute 86, probably what I would have said was how outstanding the performance was, on the ball, off the ball, disciplined, mature,” Kompany said.
“But as it is in football, it is shaped fairly by the result and every minute of the game is as important as the first one and in this case it’s tough…
“When you go home, if your children fall down what do you tell them? ‘Get back up and go again’. But you also have to really believe in that. I always have.
“What happens in the last five minutes is we throw everything away. It’s not good enough but it’s not supposed to be easy to get up to this level.”
Moyes recognised his side were lucky to escape Turf Moor with the points.
“I certainly didn’t see it (coming) at half-time with the way we started the game,” he said. “To get in at 0-0 was as good as it could get.
“We hadn’t played well in the first half at all, we were too slow, we never affected Burnley…The climax was great, it shows a lot of the things we’ve got about the team.
“A bit of resilience, we stuck at it, never wilted and had to find a way of getting a goal.
“We didn’t play at our best today. A lot of players were nowhere near their levels but ultimately we got three points in the Premier league.”
Soucek was the matchwinner in the 3-2 victory over Nottingham Forest before the international break, then scored two in two for the Czech Republic, before his sixth club goal of the season and ninth overall broke Burnley hearts here.
“Tomas scored for the Czech Republic in midweek, he’s scored today, he scored against Forest so really he’s in a bit of goalscoring form,” Moyes said.
“He took it really well and he took it as someone who’s got a bit more confidence in his finishing.
“When he first came in he got 10 goals in his first season, last year not so much but this year, I think he is up to six already so that’s great.”