The Taj Mahal is a mausoleum, not a mosque.
But there was a more important form of worship that Obama hoped to perform.
The Taj Mahal (”Big Palace”) was built by Shah Jahan, the favorite grandson of Shah Jahangir, “World Conqueror”, who established the Mughal Empire in what is today northern India and Pakistan. Shah Jahan built it as a memorial to his older wife, Mumtaz Mahal. Basically, the grandson of a kick ass warrior had become a mewing, sentimental, uxorial sap who frittered away his legacy on luxuries. Kinda like the relationship of Joe Kennedy Senior to Patches.
The Taj Mahal is a complex of several buildings. The large domed building is a mausoleum. The four towers are minarets, designed to call the faithful to pray at the mosque.