The couple wore yellow scarves and garlands at the 200-year-old Hindu temple in Bahrain's capital Manama.
Prince Charles earlier held talks with the country's long-time Prime Minister, Sheikh Khalifa bin Salman al-Khalifa.
The royal couple have also visited the United Arab Emirates and Oman during the seven-day trip.
The Bahrain visit marks 200 years of formal relations between the two countries, dating from a treaty of friendship signed in 1816.
The UK maintains strong military ties to Bahrain, where it has run its permanent naval base HMS Juffair for more than a year.
Prince Charles paid the base a visit to open a welfare block and inspect HMS Middleton.
But the trip comes amid concerns of continued human rights abuses in Bahrain.
Prince Charles has faced calls to raise concerns over how Bahrain's security forces have dealt with a string of mass protests in the country.
He began the day visiting Sheikh Khalifa, who has been in office since 1971, on the Bahraini ruler's custom-built private island.
The Middle East tour, which was organised by the UK government, aims to boost partnerships in the region in a range of areas, including wildlife conservation and women in leadership.
During the day, Camilla visited St Christopher's School, a British-style school with 2,200 pupils, speaking to the students about their literacy and music lessons.
She later met a group of young businesswomen known as the Supreme Council for Women, which is chaired by Princess Sabeeka bint Ibrahim Al Khalifa, the first wife of Bahrain's King Hamad.
The council, which was set up in 2001 to advise the government on women's issues, consists of a group of 16 women from a "wide range of backgrounds and experiences".
The royal couple later unveiled two new stamps, to commemorate two centuries of diplomatic ties between the UK and Bahrain, at the Post Office Museum.
Prince Charles also visited the Al-Fateh Grand Mosque, the largest in the country, where he signed the visitors' book and was given a tour.
The Prince of Wales has met Bahrain's prime minister before visiting a temple with the Duchess of Cornwall on their final day of touring the Middle East.