The Prime Minster made the threat at the Dispatch Box at the start of a debate leading to two crunch votes in the House of Commons.
“The public does not want delay Mr Speaker,” he told the House. “What on earth will the public think of us if this house again votes to delay Brexit?”
“If parliament refuses to allow Brexit to happen... in no circumstances can the government continue with this,” he concluded. “With great regret I will have to say the Bill will have to be pulled and we will have to go forward to a general election.
“I will argue at that election ‘Let’s get Brexit done” ... and the people will decide.”
He said asking for another extension to Article 50 would mean the EU would be left to decide what happens next.
Mr Johnson predicted that opponents of Brexit would then demand “weeks, months perhaps years to debate this matter”.
During the debate, Mr Johnson sought to clinch extra votes by giving important assurances to MPs who asked questions.
To Labour MP Caroline Flint he committed to preserve environmental standards. To fellow Labour MP Jim Fitzpatrick he pledged to preserve consumer rights.
But he clashed with DUP Westminster leader Nigel Dodds who said the deal would leave Northern Ireland “de facto” subject to European Union customs controls.
Mr Johnson replied to loud grumbles from the DUP benches: “There are no checks GB-NI. There will be some light-touch measures to ensure there is no illegal trade.”
His brother Jo Johnson, who quit as a Cabinet minister over fears that Mr Johnson would go for a no-deal Brexit, quipped: “I congratulate him on getting a deal - I never doubted it.”
Shadow chancellor and Labour MP John McDonnell tweeted: "Johnson threatening a general election because Parliament might want a few more days to scrutinise his Withdrawal Bill. Pathetic. What has he got to hide?"
Liberal Democrat Brexit spokesman Tom Brake described the Prime Minister's threat to withdraw his deal if his plans are not backed by Parliament as "childish blackmail".
"MPs shouldn't be bullied into voting in favour of this ridiculously short timetable,” he said.
"Boris Johnson is trying to rush through this bad Brexit deal without proper scrutiny."
Earlier Mr Johnson told the Commons: "I will in no way allow months more of this.
"If Parliament refuses to allow Brexit to happen and instead... decides to delay everything until January or possibly longer in no circumstances can the Government continue with this...
"And with great regret I must say that the Bill will have to be pulled and we will have to go forward to a general election and I will argue at that election let's get Brexit done."
He asked MPS: "Is there anyone who seriously believes that the EU would re-open the Withdrawal Agreement again. On the contrary our European friends could not be clearer. The deal on the table is the one contained in this Bill.
"And the decision for this House is whether to ratify this deal rather than go round in circles in a futile attempt to construct a new one.”
Responding to critics of the three-day timetable for the Commons debates, he said; "I don't think we should be daunted in this House by the task we have before us. But let us work night and day if that is what it takes to get this done. Our European friends are not showing any enthusiasm to agree a delay that Parliament has asked for."
Labour leader Jeremy Corbyn, in his speech, told MPs: "We warned on Saturday that if the House passes the Government's deal, it'd be a disaster for our country.
"Now, as we look through the details of the Bill, we see just how right we were.
"Page after page of what amounts to nothing less than a charter for deregulation and a race to the bottom.
"A deal and a Bill that fails to protect our rights and our natural world, fails to protect jobs and the economy, fails to protect every region and every nation in the United Kingdom.
"This Bill confirms Northern Ireland is really in the customs union of the EU and goods will be subjected to tariffs."
Labour MPs Lisa Nandy and Gloria De Piero intervened to tell Mr Corbyn they would vote for Mr Johnson’s Bill against Labour’s whipping – but only so they could try to “improve it” with amendments in its committee stage to protect jobs and trade with Europe.