"Let me be clear. As a citizen, and as president, I believe that Muslims have the same right to practice their religion as anyone else in this country," he said.
"That includes the right to build a place of worship and a community centre on private property in lower Manhattan, in accordance with local laws and ordinances.
"This is America, and our commitment to religious freedom must be unshakable," Obama added.
The White House had not previously taken a stand on the mosque, which would be part of a $100m Islamic centre two blocks from what has become known as Ground Zero.
Obama has tried to reach out to the global Muslim community since taking office, and the over 100 guests at Friday's dinner included ambassadors and officials from numerous Muslim nations, including Saudi Arabia and Indonesia.
Al Jazeera's Rosiland Jordan reports on the debate surrounding the proposed centre
"Our capacity to show not merely tolerance, but respect towards those who are different from us, and that way of life, that quintessentially American creed, stands in stark contrast to the nihilism of those who attacked us on that September morning, and who continue to plot against us today," he said.
New York City Mayor Michael Bloomberg, an independent who has been a strong supporter of the mosque project, welcomed Obama's words as a "clarion defence of the freedom of religion".
But top Republicans including Sarah Palin, the former vice-presidential candidate, and Newt Gingrich, the former speaker of the House of Representatives, have already announced their opposition.
The Cordoba Initiative, the group behind the project, describes it as a Muslim-themed community centre with a view of making it a hub for interfaith interaction, as well as a place for Muslims to bridge some of their faith's own schisms.
The mosque has won approval from local planning boards but faces legal challenges.
Opponents, including some relatives of the victims of the September 11 attacks, see the prospect of a mosque so near the destroyed trade centre as an insult to the memory of those killed. Some of the victims' relatives, however, are in favour.