Is it a sin for a Catholic to visit the city of Mecca in Saudi Arabia?
Travelling is one sure means of gaining vast awareness about other places, people and their behaviors. So travelling as a Catholic to any place is not inherently immoral, so long as the place is not evil.
Every country or place have laws and custom guiding them, and they usually enforce those laws and custom on both citizens and foreigners alike. Therefore, Catholics travelling to other places are expected as children of God to obey those laws, customs and traditions; so long as the Laws and Customs are not sinful or evil. So there’s no need to visit a place where their laws and customs are sinful and could damage your faith.
As far as Mecca of Saudi Arabia is concerned, no non-Muslim is legally permitted to visit her. As a good catholic you should obey it.