In his Tory conference speech he warned that the threat of global recession was as serious as it was in 2008.
But he urged a "can-do" attitude and the "spirit of Britain" to see the country through to better times.
Labour accused him of "squeezing living standards and choking off the economic recovery" as UK growth was downgraded.
Mr Cameron's speech to the Conservative Party conference in Manchester was delivered as official figures showed slower UK economic growth than had been thought and amid the worsening eurozone crisis.
Part of the speech was re-written at a late stage to remove a call for households to pay off credit card debts amid Downing Street fears Mr Cameron would appear out-of-touch with ordinary voters.
'Slowly, but surely'During the 50-minute address, he told party activists that "nobody wants false optimism" about the state of the economy and acknowledged it was an "anxious" time for many people, with rising prices, job losses and a shortage of affordable housing.
"As we meet here in Manchester, the threat to the world economy - and to Britain - is as serious today as it was in 2008 when world recession loomed.
Continue reading the main storyLet's summon the energy and the appetite to fight for a better future for our country, Great Britain”End Quote David Cameron "The eurozone is in crisis, the French and German economies have slowed to a standstill; even mighty America is being questioned about her debts," he said.
But Mr Cameron rejected Labour calls for a slowdown in deficit reduction and to introduce short-term tax cuts to boost growth, telling party members: "Our plan is right and our plan will work.
"I know you can't see it or feel it yet. But think of it like this: the new economy we're building, it's like building a house. The most important part is the part you can't see - the foundations that make it stable.
"Slowly, but surely, we're laying the foundations for a better future. But this is the crucial point: it will only work if we stick with it."
Mr Cameron struck a self-consciously upbeat tone during much of the speech as he invoked what he called "the British spirit".
He said that "we don't have to accept that success in this century belongs to others" and urged the UK to "show the world some fight".
And he repeatedly stressed that only he could provide the leadership the country needs in "difficult times" - as demonstrated, he said, by his decision to go to war in Libya.
'Can-do optimism'He rejected claims that the government was doing nothing to boost growth, saying the only way to deal with Britain's "debt crisis" was to pay off its debts.
He pointed to planning reforms and cutting red tape as examples of how the government was boosting growth - but vowed not to repeat the mistakes of the past on bank regulation when building the "new" economy.
Mr Cameron said it would be down to the British people - and British industry - to make growth happen: "Let's reject the pessimism. Let's bring on the can-do optimism. Let's summon the energy and the appetite to fight for a better future for our country, Great Britain."
And he had a tough message for critics of controversial planning reforms: "To those who just oppose everything we're doing, my message is this: Take your arguments down to the job centre. We've got to get Britain back to work."
Continue reading the main storyOur economic difficulties have gone well past the point where can-do optimism can make a difference”End Quote Brendan Barber TUC There were few new policies - apart from an announcement that 90,000 young people would take part in the third year of the National Citizen Service and plans to increase the adoption rate for children in care.
And he got a round of applause for announcing a consultation on legalising gay marriage.
His jibe that his party does not "boo" its former leaders - a reference to the heckling of Tony Blair's name at Labour's conference last week - went down very well in the hall.
His vow to keep Britain out of the euro and avoid eurozone bail outs also got good rounds of applause - as did his promise never let Labour anywhere near the British economy again.
'Action not rhetoric'He ended with a direct message to the nation: "We have the people, we have the ideas and now we have a government that's freeing those people, backing those ideas.
"So let's see an optimistic future. Let's show the world some fight. Let's pull together, work together. And together lead Britain to better days."
For Labour, shadow business minister Chuka Umunna said his party had set out a five-point plan to create jobs, while Mr Cameron continued to offer "nothing but platitudes and more of the same".
"This morning David Cameron was lecturing families about the need to pay off credit card bills. By the afternoon he had been forced to drop the offending language, but his policies are still squeezing living standards and choking off the economic recovery," he added.
Trades Union Congress general secretary Brendan Barber said: "Our economic difficulties have gone well past the point where can-do optimism can make a difference.
"We need policies for jobs and growth and help for families suffering the biggest fall in living standards in a generation."
Federation of Small Businesses chairman John Walker welcomed the prime minister's "vision of a deregulated economy" but said there must now be "clear action to match the rhetoric."