However, for much of a lacklustre contest in Trnava it looked like England would be frustrated with a re-run of the goalless draw the teams shared in their last clash during the group stage at Euro 2016 in Saint-Etienne in June.
England struggled to shrug off familiar problems, controlling the game without looking like winning it even after Slovakia defender Martin Skrtel was dismissed for stamping on Harry Kane in the 57th minute.
His departure signalled a period of intense pressure from England with Lallana hitting the post, and substitute Theo Walcott seeing a scrambled effort ruled out for offside, before the Liverpool midfielder snatched the last-gasp winner.
"We didn't panic, that was the main thing," said captain Wayne Rooney, who played in his 116th international to become England's most capped outfield player ahead of David Beckham.
"We stuck to our plan and kept our shape. Adam scored the goal to get us off to an excellent start (in the campaign)."
Before the game Allardyce, who replaced Roy Hodgson after England's shock Euro 2016 exit to Iceland, said he would be happy with a point from what he expected to be their hardest qualifying game, so he was delighted with the win.
"We got what we deserved," he said. "It looked like it wasn't going to be our night and it was pretty nerve-wracking at the end, but well done Adam. It was an important win."
(Reporting by Neil Robinson; Editing by Ken Ferris; Editing by Ken Ferris)
