Pablo Fornals had put West Ham in front on 10 minutes, when he collected a Joe Gomez clearance and struck in a low shot.
Liverpool's increasing pressure paid off three minutes before half-time thanks to Mohamed Salah's penalty after the Egyptian had been fouled by Arthur Masuaku.
After the break, Fornals had one shot saved and another blocked by Andrew Robertson.
Shortly after having a goal overturned on 77 minutes after the Video Assistant Referee had spotted a foul in the build-up, Jota scored the winner.
Fellow substitute Xherdan Shaqiri played him in with an exquisite pass to finish and send Liverpool top on 16 points, as they equalled their longest unbeaten home run of 63 league matches.
West Ham are 13th on eight points as their four-match unbeaten run was ended.
King of the Match: Mohamed Salah (LIV)
Liverpool: 8 Nov v Man City (A)
West Ham: 7 Nov v Fulham (H)