Translation:The river behind the city is wide and deep.
Would "A város mögötti folyó" also work here and, if yes, which one would be more "correct" or natural?
Both are correct, and none of them are more natural than the other one. But I would use 'a város mögötti folyó".
Is this like making an adjective of the adverbial phrase by adding "-i" to the last word? (I'm just a beginner and had never come across it before.)
Yes, that's how it works. The main role of the suffix -i is to turn nouns that refer to a location into an adjective. Amerika -> amerikai (American / of America); Budapest -> budapesti (of Budapest).
This doesn't work with all such nouns, and, as you can see, not only nouns can take it.