Obama expressed his desire in response to a question from a student Lilly during his discussion with ninth graders at Wakefield High School in Arlington, Virginia, where he was accompanied by the education secretary and gave a national speech welcoming students back to school.
Obama called for students to take responsibility and learn from their failures so that they succeed in the end.
One of the students asked Obama, "Hi. I'm Lilly. And if you could have dinner with anyone, dead or alive, who would it be?"
"Dinner with anyone dead or alive? Well, you know, dead or alive, that's a pretty big list," Obama responded amidst laughter.
Turning sober the next moment he said, "You know, I think that it might be Gandhi, who is a real hero of mine."
"Now, it would probably be a really small meal because he didn't eat a lot," he said, again generating laughter. "But Mahatma Gandhi is someone who has inspired people across the world for the past several generations."
Terming the iconic figure as the source of inspiration for many, Obama said, "He (Mahatma Gandhi) is somebody whom I find a lot of inspiration in. He inspired Dr (Martin Luther) King ; so if it hadn't been for the non-violent movement in India, you might not have seen the same non-violent movement for civil rights here in the United States."
"What was interesting was that he ended up doing so much and changing the world just by the power of his ethics, by his ability to change how people saw each other and saw themselves -- and help people who thought they had no power realise that they had power, and then help people who had a lot of power to realise that if all they're doing is oppressing people, then that's not a really good exercise of power," Obama said.
Expressing his belief in the way of change proposed by Gandhi, the President said, "I am always interested in people who are able to bring about change, not through violence, not through money, but through the force of their personality and their ethical and moral stances. That is somebody I would love to sit down and talk to," said Obama.
The Mahatma has always been a source of inspiration for this first African-American US president.
'In my life, I have always looked up to Mahatma Gandhi as an inspiration, because he embodies the kind of transformational change that can be made when ordinary people come together to do extraordinary things, he wrote in the ethnic India Abroad newspaper, owned by rediff.com, last year.
"That is why his portrait hangs in my Senate office -- to remind me that real results will not just come from Washington, they will come from the people," Obama said.
Image: US President Barack Obama speaks at Wakefield High School in Arlington on Tuesday | Photograph: Jonathan Ernst/Reuters
Mahatma Gandhi, my inspiration: Obama
How Mahatma Gandhi inspires Obama
Mahatma Gandhi and Rahul: Maya's latest targets
Mahatma Gandhi Peace award for Aung San Suu Kyi
What does Obama's tax proposal mean for India?