As I see it, they are both grammatical (both have "that" omitted after "the first time"), but #1 is rarely said.
The reason #2 is preferred lies in the fact that the simple present tense of #1 does not capture a specific action (visiting the city) very well (although not impossible). For specific occurrences, the present perfect (I've visited - if it has taken place) or the present progressive (I am visiting - to emphasize it's progressing now) is how most people would say it. The present perfect is by far the standard phrase but you can use the present progressive if you're on the way there, for example, since the visit hasn't quite happened yet.
There are other cases though where the simple present is the right tense to use. If you want to say you don't go to the movie theater often, for example, you are talking about a general behavior pattern, and for that the present simple is the best. So you can say "It is not often (that) I go to the movie theater.
Another thing to note is that, as you mentioned, phrases like "the first time", "the second/third/only/last time", etc. work particularly well with the present perfect tense. It is because these phrases are essentially about one's experiences and experiences are typically expressed in present perfect tense (or past perfect if recounting past events). Another construct that works very well with them is the to-infinitive, as in "It is the first time for me to visit the city", "I was the second person to arrive at the scene", etc.