Hernandez cancelled out Ryan Babel’s early strike by jabbing the ball in with his hand the far post.
It was a punch that knocked the stuffing out of Fulham, especially after it was replayed on the big screens to the dismay of the travelling fans.
Referee Lee Mason and his assistants missed it but video technology would have surely seen the goal disallowed.
That will be scant consolation to Fulham boss Claudio Ranieri, though, as his struggling side conceded further goals from Issa Diop and Michail Antonio.
The defeat at the London Stadium left the Cottagers eight points adrift of safety with just 11 matches to go and that bleak picture could look even worse after the weekend fixtures.
“It’s unbelievable. We started very well,” Ranieri told Sky Sports.
“They were very dangerous on corners and it was a big pity the referee was covered by players and didn’t see the first goal was handball.”
“I tell my players if we fight, maybe we can win,” he added. “If we don’t fight, we have lost before we play. It’s important to stay together and continue to try our best.”
An under-hit backpass from Pablo Zabaleta sent Babel through on goal but he was unable to beat Hammers goalkeeper Lukasz Fabianski from close range.
Babel did not fluff his next opportunity, however, tapping in a cross from Jean Michael Seri to give Fulham a third-minute lead.
Fulham have yet to win away all season and their defending from set-pieces let them down badly.
Diop went close to an equaliser when he headed wide before the Hammers hauled themselves level with Hernandez’s controversial 29th-minute goal.
The Mexican bundled the ball in at the far post after Fulham keeper Sergio Rico flapped at a corner and Angelo Ogbonna helped it on.
It was a 50th Premier League goal for former Manchester United striker Hernandez, all of which have come from inside the penalty area.
West Ham took the lead in the 40th minute when centre-back Diop was somehow allowed a run-up to score with a header from another Robert Snodgrass corner.
Fulham offered precious little threat in the second half.
West Ham were able to give a late cameo to Manuel Lanzini, the Argentine’s first appearance of the season following a torn knee ligament.
Fellow substitute Marko Arnautovic was denied a goal by a fine save from Rico, but he set up Antonio for the killer third in stoppage time as Fulham were pushed another step closer to the Championship.