The Prime Minister spent around 15 minutes at the temple, which is considered an essential part of Dhaka's cultural heritage and one of the major 'Shaktipeeths' of the region.
The name "Dhakeshwari" means "Goddess of Dhaka" and experts said the Bangladesh capital derived its name from Dhakeshwari.
Since the destruction of Ramna Kali Mandir in 1971 by the Pakistan army during the Bangla Liberation War, the Dhakeshwari temple has assumed status as the most important Hindu place of worship in Bangladesh.
Modi was felicitated by the priests and authorities of the temple. He was given a replica of Goddess Dhakeshwari and a shawl besides other memorabilia.
More From This Section
A number of people here said Bangladesh Prime Minister Sheikh Hasina visits the temple once every year.
External Affairs Minister Sushma Swaraj had visited the temple when she came here in June last year.
The Dhakeshwari temple was built in the 12th century by Ballal Sen, a King of Sena dynasty.
The temple, which is thronged by thousands of people daily, was closed for around one hour for common public in the morning due to Modi's visit.