But West Ham had a chance to level the scores from the penalty spot on the stroke of half-time when Joe Gomez brought down forward Jarrod Bowen, but the forward saw his attempt superbly saved by goalkeeper Alisson.
Liverpool, lacking the intensity they showed against City, struggled to contain a lively West Ham after the break, who would have taken a deserved point home had either Said Benrahma or Tomas Soucek converted great chances.
Klopp looked relieved when the final whistle blew and gave a special hug to goalkeeper Alisson whose save from Bowen's penalty proved the difference in the end.
"It was an outstanding penalty save. It was a really well-taken penalty, right in the corner, and I had no idea how Ali did that," Klopp said.