The visit on Tuesday was part of a three-day visit by Gul aimed at bolstering Turkey's role in both the Israeli-Palestinian and Israeli-Syrian tracks of the Middle East peace process.
Gul's appearance in Jerusalem coincided with the killing of some eight Palestinian farmers in northern Gaza by the Israeli army.
Turkish officials accompanying him refused to comment on the incident, however.
The foreign minister, accompanied by a large delegation of Turkish academics and historians from Ankara and Istanbul, toured the sacred sites of the Haram al-Sharif, including the Dome of the Rock.
Gul and his wife later prayed inside al-Aqsa Mosque while Israeli security guards stood outside.
Speaking to members of the Supreme Muslim Council, which administers Islamic holy places in Jerusalem, Gul reportedly said that "these places concern the entire Muslim umma [community]".
"The safety of this place is of utmost concern to all Muslims. This is not only a Palestinian or Arab issue," he said.
The mufti of Jerusalem, Ikrima Sabri who, along with other Muslim dignitaries and religious scholars, received Gul, described the visit as "religious not political in nature".
Turkey has offered its services in
promoting peace in the region
"This is a religious visit. The man is a religious Muslim, and we saw that he was quite pleased visiting and worshipping at the world's third holiest Islamic shrine," he said.
Muslims consider al-Aqsa Mosque as the first qibla (the direction to which Muslims turned during prayers prior to Makka) and third holiest mosque, directly after the Sacred Mosque in Makka and the Prophet's Mosque in Madina, in Saudi Arabia.
Sabri said he was hopeful Gul's visit would lay the foundation for strong and long-lasting relations between the Supreme Islamic Council and Turkey.
Shaikh Muhammad Husain, one of the highest-ranking Muslim religious officials, told Aljazeera.net that Gul's visit indicated that Turkey was conscious of Palestinians' plight, especially in light of alleged efforts by Jewish extremists to destroy or harm Islamic holy places in Jerusalem.
Husain said: "There is no doubt this visit carries a subtle political message to the Israeli government."
Abd Allah Abd Allah, under-secretary of the Palestinian Foreign Ministry, also lauded the visit.
"The visit comes to prove that the new Turkish government seeks to solve the Palestinian-Israeli struggle and reaffirms the official Turkish stance in supporting the Palestinians right to set up an independent state," he said.