Urgently seeking a breakthrough, the prime minister spoke out against what he called Farage's "little England" vision and played the patriotism card by saying a June 23 out vote would mean "quitting, and I don't think we're quitters".
Despite an assured performance, Cameron faced repeated hostile questions from the audience on high immigration from the European Union to Britain, the "Leave" side's trump card during the campaign.
UK's 'Leave' EU camp moves ahead in polls
"I really fear if we leave that we're going to see the economy suffer," Cameron said at London's Olympic Park in a programme for the broadcaster ITV.
"I would say the right thing to do, the British thing to do is to fight for a Great Britain inside the EU and not take the Nigel Farage little England option," Cameron added.
A combative Farage, leader of the UK Independence Party, railed against European Commission chief Jean-Claude Juncker and brandished his own passport to argue for stronger border controls.
"We're British, we're better than that, we're not going to be bullied by anybody, not least the unelected, charming though he may be, Jean-Claude Juncker," Farage said.
With 16 days to go, Cameron's "Remain" camp has 51 percent support and "Leave" is on 49 percent, according to a poll of polls by academics at What UK Thinks.
Cameron and Farage did not debate directly against each other, instead facing half an hour each of questions from the audience.
Polls on Monday briefly gave the "Leave" campaign a slender lead, sending the pound tumbling as concerns grew on the global markets about turmoil that could follow a Brexit.
Cameron warns Brexit threatens peace in Europe
The TV event came as "Remain" fought back on Tuesday, with Cameron holding a rare and hastily-arranged press conference where he warned voters against believing "untruths" and "nonsense" peddled by the pro-Brexit campaign.
He rejected claims that a non-eurozone Britain could be forced to contribute to future eurozone bailouts and that its EU budget rebate was at risk.
World Trade Organization Director General Roberto Azevedo became the latest head of a major international institution to warn about the risks of Britain leaving.
He said that British exporters could face an extra £5.6 billion ($8.2 billion, 7.2 billion euros) of annual customs duties if Britain pulled out of the EU.
People rushed to register to vote on Tuesday ahead of the midnight (2300 GMT) deadline.
Some 226,000 people applied for the right to vote on Monday alone, including 148,200 under the age of 34 -- a group seen as overwhelmingly in favour of staying in the EU.
Brexit campaigners unveil points-based immigration plan
Before the TV event, Cameron was put on the spot over his failure to hold a head-to-head debate with any leading pro-Brexit figure from his own Conservative party, such as former London mayor Boris Johnson.
Johnson, tipped as a possible successor to Cameron, and justice minister Michael Gove issued a challenge in a joint statement.
There will be eight main television interviews and hustings between now and June 23. Cameron is only appearing in three and will not directly debate the "Leave" camp in any of them.
Farage is not part of the official Vote Leave campaign but has been cutting a a high profile with his relentless focus on the need to cut back the number of EU migrants who come to Britain each year.
UK Brexiteers grab limelight, three weeks before EU vote
Official figures last month showed that 270,000 EU citizens came to Britain in 2015, up 6,000 on the previous year. Britain has a population of roughly 64 million.
Archbishop of Canterbury Justin Welby made a rare political intervention Tuesday by suggesting Farage had been "giving legitimisation to racism" for "political ends" during the campaign.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ