Speaking to reporters at the G20 summit, the unnamed official said "no-one pays any attention" to Britain.
Mr Cameron said Russia had "absolutely denied" the remarks.
But he used the opportunity to champion Britain, saying few other nations had "a prouder history, a bigger heart or greater resilience".
British relations with Russia have been strained in recent years following the murder of former KGB agent Alexander Litvinenko in London in 2007.
The two countries disagree over what to do about the war in Syria, which is dominating discussions at the two-day summit.
Downing Street has sought "clarification" about the remark, which was made by a Russian official to a group of journalists including the BBC earlier this week and subsequently reported by BBC Political Editor Nick Robinson.
Russian President Vladimir Putin's chief spokesman, Dmitry Peskov, said he did not know the source of the remark but stressed that it did not come from him.
Mr Cameron said he had not heard the remark but he had little doubt about Britain's standing in the world and its outstanding contribution in a wide range of fields.
"Let me be clear - Britain may be a small island but I would challenge anyone to find a country with a prouder history, a bigger heart or greater resilience," he told reporters.
"Britain is an island that has helped to clear the European continent of fascism and was resolute in doing that throughout World War II.
"Britain is an island that helped to abolish slavery, that has invented most of the things worth inventing, including every sport currently played around the world, that still today is responsible for art, literature and music that delights the entire world.
"We are very proud of everything we do as a small island - a small island that has the sixth-largest economy, the fourth best-funded military, some of the most effective diplomats, the proudest history, one of the best records for art and literature and contribution to philosophy and world civilisation."
He added: "For the people who live in Northern Ireland, I should say we are not just an island, we are a collection of islands. I don't want anyone in Shetland or Orkney to feel left out by this."
He repeated the speech at a press conference at the close of the two-day summit, adding in references to The Beatles, Shakespeare, Elgar and latest pop sensations One Direction.
"If I go on too long about our literature, our art, our philosophy, our contribution, including of course the world's language... if I start talking about this 'blessed plot, this sceptred isle, this England' I might have to put it to music, so I think I'll leave it there," he said.
Mr Peskov told reporters he didn't know the origin of the "small island" remark.
"I simply can't explain the source of that claim. Definitely it is nothing to do with reality. It is definitely not something I have said. I don't know whose views it reflects - it's nothing to do with us.
"We have very positive dynamics in our relationship between Britain and Russia. We have very good contacts between our two leaders, Mr Putin and Mr Cameron."
But a Conservative MP has waded into the row by saying on Twitter that President Putin "really is a tosser".
Confirming his views to the BBC, Crawley MP Henry Smith added: "I would say in other forums he's an absurd character. I think it's appalling and shameful what he did in protecting the Assad regime."
But the MP was slapped down by Mr Cameron, who told reporters in St Petersburg:  "I'm not a regular follower of Twitter, but insulting people should never have a part in foreign policy."
David Cameron has made an impassioned defence of Britain's history and achievements after a Russian official dismissed it as "just a small island".