Phil Gramm, a former Texas senator who is a vice chairman of the Swiss bank UBS, made the remarks in an interview with The Washington Times. Gramm has a doctorate in economics.
CBS News senior White House correspondent Bill Plante said Gramm's remarks played perfectly into the hands of the Obama campaign's argument that the GOP leaders are out of touch with regular American voters.
"America already has one Dr. Phil. We don't need another one when it comes to the economy," Obama said during a town-hall event focused on helping women advance economically.
Obama drew cheers and laughter with that comment and boos and hisses when he read Gramm's quotes to the crowd. He contrasted them with rising gas and food prices, home foreclosures and job layoffs.
"It's not just a figment of your imagination," Obama said. "Let's be clear. This economic downturn is not in your head."
"It isn't whining to ask government to step in and give families some relief," he said, drawing a standing ovation from the nearly 3,000 people in a high school gymnasium. "And I think it's time we had a president who doesn't deny our problems or blame the American people for them but takes responsibility and provides the leadership to solve them."
The economy is the top issue of voters, and, thus, has become the No. 1 issue in the presidential campaign as each candidate seeks to portray the other as out of touch with the country's struggles and himself as the leader able to pull the nation out of tenuous times.
CBS News senior political correspondent Jeff Greenfield said the comments couldn't have come at a worse time for McCain.
"You're in the suburb of Detroit - an area with 10 percent unemployment. You're trying to show that you're a Republican but you're not a conventional stereotype Republican, you feel the pain, to coin the phrase of the workers - and your top economic adviser is calling the country a nation of whiners, saying it's all in your head... Not helpful," said Greenfield.
As he sought to differentiate himself from McCain, Obama seized on quotes attributed to Gramm by the Washington newspaper.
"You've heard of mental depression; this is a mental recession," Gramm told the Times. He noted that growth has held up at about 1 percent despite all the publicity over losing jobs to India, China, illegal immigration, housing and credit problems and record oil prices. "We may have a recession; we haven't had one yet."
"We have sort of become a nation of whiners," Gramm said. "You just hear this constant whining, complaining about a loss of competitiveness, America in decline" despite a major export boom that is the primary reason that growth continues in the economy, he said.
McCain disavowed Gramm's comments at a campaign event in Belleville, Michigan, reports CBS News' John Bentley.
"Phil Gramm does not speak for me," McCain said. "I strongly disagree."
Gramm has often been mentioned as a possible treasury secretary should McCain win the White House. Plante reports that when the McCain was asked about that possibility on Thursday, he joked that Gramm may still get a political appointment - as ambassador to a former Soviet republic.
"I think Sen. Gramm would be in serious consideration for ambassador to Belarus, although I'm not sure the citizens of Minsk would welcome that," he said.
Later on Thursday, Gramm said in an interview that he meant the nation's leaders were whiners, not its citizens, The Washington Post reported, but he declined to retract his comments.
"I'm not going to retract any of it. Every word I said was true," Gramm said.