“The Great Mosque of Cordoba.” That’s what Unesco—the cultural arm of the United Nations—calls the 24,000-square-foot 10th-century structure visited by 1.5 million tourists a year. It was declared a World Heritage site in 1984, and rightfully so: The building’s interior is a stunning example of Moorish architecture.

Yet this “mosque” is actually the cathedral of the Roman Catholic Diocese of Córdoba. In 1236, King Ferdinand III of Castile captured Córdoba from the Almohad Caliphate. He then had the building consecrated for...