Klopp’s side were in danger of dropping Premier League points for the first time since their draw at Manchester United on October 20 after falling behind in the second half at Anfield on Monday.
Georginio Wijnaldum put Liverpool ahead early on but Issa Diop equalised soon after.
Pablo Fornals gave struggling West Ham a stunning lead, but Lukasz Fabianski’s woeful blunder allowed Mohamed Salah to equalise with his 19th goal of the season.
Sadio Mane completed the fightback with nine minutes left as Liverpool restored their 22-point lead over Manchester City.
The dramatic escape ensured they equalled Manchester City’s top-flight record of 18 consecutive wins set between August and December 2017.
Klopp, usually reluctant to celebrate milestones, confessed to being impressed by Liverpool’s relentless run.
“A couple of years ago, three or four maybe, in the beginning, I said we want to write our own stories, we want to create our own history,” Klopp said.
“Obviously, the boys took really seriously what I said there. It’s so special, the numbers are incredible, so difficult.
“We said it a couple of times, we spoke about wonderful games, brilliant games, we spoke about hard games, difficult games. In the end, that’s what counts.”
‘We are ready to fight’
Liverpool’s 21st successive league victory at Anfield also equalled their own English top-flight record for consecutive home wins, set by Bill Shankly’s team between January and December 1972.
They need 12 points from their final 11 games to guarantee a first title since 1990.
They are unbeaten in their last 44 league matches, just five short of Arsenal’s all-time English record of 49.
It is unthinkable that Liverpool would squander their lead now but, publicly at least, Klopp is taking nothing for granted.
“We all know it’s very special, but in the moment we are really just in the situation and want to recover and prepare for the next one,” he said.
“The next opponent is really waiting and wants to fight us. I saw the boys tonight, they are ready to fight and as long as we are really ready to fight, nobody should worry, but we still have a lot of work to do.”
Klopp’s men found themselves in the rare position of coming off a defeat, for only the third time in all competitions this season, after Tuesday’s 1-0 Champions League last 16 first leg loss at Atletico Madrid.
And third from bottom West Ham gave them all they could handle in a thrilling clash that suggested Liverpool are not invincible just yet as they try to emulate Arsenal’s unbeaten 2003-04 top-flight campaign.
Another record was equalled as Liverpool right-back Trent Alexander-Arnold matched last season’s Premier League landmark of 12 assists from a defender, having supplied the crosses for Wijnaldum and Mane.
“I think we passed the moment where we treat (Alexander-Arnold) like a young boy, he is just a proper member of the squad,” Klopp said.
“Everybody has to contribute, everybody has to bring on the pitch what he is able to do — and the boys do a lot to bring him or (Andy Robertson) in the position and save them there.
“I don’t want to make the performance more than it is, I am completely happy with it but that’s how football works on the highest level.”
For more news your way, download The Citizen’s app for iOS and Android.
Download our app and read this and other great stories on the move. Available for Android and iOS.