The pope also used his visit to seek to heal rifts between Islam and Christianity.
Earlier in the year Benedict angered many Muslims after appearing to suggest that Islam was a violent and irrational religion.
"He [the pope] reiterated his view of Islam as peaceful and affectionate"
Recip Erdogan, Turkey's prime minister
Send us your views
"Freedom of religion, institutionally guaranteed and effectively respected in practice, both for individuals and communities, constitutes for all believers the necessary condition for their loyal contribution to the building up of society," the pope said at the Directorate of Religious Affairs in Ankara as Bardakoglu listened.
The Muslim cleric then gave a speech which echoed the pope's call for more understanding between Islam and Christianity.
"We too are for dialogue between religions," he said, "but this [dialogue] should have a solid basis."
Bardakoglu warned that attacking Islam would only worsen the 'clash of civilisations'.
"Such accusations and attempts can only serve to encourage those who perform wrong-doing on behalf of religion by way of exploitation," he said.
The two men, both dressed in white ceremonial robes and accompanied by their respective delegations, talked and exchanged presents before shaking hands for the cameras.
The two delegations then held closed-door talks. The pope and Bardakoglu were later scheduled to make a statement to the press.
Bardakoglu, the director of religious affairs, had previously accused Benedict of harbouring "hatred in his heart" for Muslims.
Earlier in the day the pope had briefly met Recip Erdogan, Turkey's prime minister, who later said that the pope had supported Ankara's ambitions to join the European Union.
"He said we are not political but we wish for Turkey to join the EU," Erdogan told journalists.
Erdogan, who began his career in Islamic politics, added: "The most important message the Pope gave was towards Islam, he reiterated his view of Islam as peaceful and affectionate."
Erdogan had initially said that he would be too busy to meet the pope, citing his commitment to attend a Nato conference in Latvia.
The pope also laid a wreath at the tomb of Kemal Attaturk, the founder of the modern secular Turkish state.
Turkey has deployed thousands of police and security forces during the papal visit, but protests against him have so far been muted in the country of 80 million.
On Tuesday only a few hundred urkish nationalists and religious activists turned out in Ankara to demonstrate against the pope's visit.
Larger protests are expected later in the week when the pope is scheduled to visit Istanbul.
There he will visit the Blue Mosque and the Hagia Sofia, a Byzantine church that was once the centrepiece of medieval Greek-ruled Constantinople.
For hundreds of the years Constantinople was the greatest city in the Christian world before it was conquered by the Muslim Ottoman Empire in 1453.