Mr Obama, 47, the Democratic presidential candidate, announced the news in a joint statement with his sister Maya Soetoro-Ng.
He said: "She was the cornerstone of our family, and a woman of extraordinary accomplishment, strength, and humility. She was the person who encouraged and allowed us to take chances."
The candidate learned of her death Monday morning while he was campaigning in Jacksonville, Florida. He planned to go ahead with campaign appearances.
Late last month, Mr Obama took a break from campaigning and flew to Hawaii to be with the 86-year-old Dunham.
Mr Obama said the decision to go to Hawaii was easy to make, telling American television station CBS that he "got there too late" when his mother died of ovarian cancer in 1995 at 53, and wanted to make sure "that I don’t make the same mistake twice."
As he became the first African American presidential nominee of a major US political party, Mr Obama paid tribute to his grandmother.
"When I hear a woman talk about the difficulties of starting her own business, I think about my grandmother, who worked her way up from the secretarial pool to middle-management, despite years of being passed over for promotions because she was a woman," he told his party’s national convention in Denver, Colorado, in August.
"She’s the one who taught me about hard work. She’s the one who put off buying a new car or a new dress for herself so that I could have a better life. She poured everything she had into me. Source: The Telegraph (UK)
"And although she can no longer travel, I know that she’s watching tonight, and that tonight is her night as well."
In a campaign advert earlier this year, Mr Obama described his grandmother as the daughter of a Midwest oil company clerk who "taught me values straight from the Kansas heartland".
He said this included things like "accountability and self-reliance. Love of country. Working hard without making excuses. Treating your neighbour as you’d like to be treated".
Mrs Dunham was also the "white grandmother" he referred to in a high-profile speech on race as he called for a "more perfect union" in the US.