Do they mean the same thing? What situations should I use one over the other?
都市 is a little stiff word that means "city" or "urban area". See: What is the difference between 市, 都市, 都会 and 市街
郷【ごう】 is an uncommon word that roughly means "countryside", "country town", "town", etc. It's also a rare name suffix for small districts in some towns/villages. Practically speaking, you probably don't need this word outside of this common idiom.
EDIT: -郷【きょう】 is a rare suffix that roughly means "village" or "town". You would see it only in a few fixed compounds including 温泉郷.