Even if Gotham City isn't the state capital, it's still possible that the Governor works there.
But obviously that wasn't the intention of the writers. I didn't see the episode, but given the title of the show and the precedent of prior Batman fiction, I assume the priority is to tell stories about the control of the city itself. The
state that Gotham occupies has never been that significant an element in Batman-related fiction; it's all about the city. So it's perfectly understandable why the writers chose to focus on the mayor. It's a total non sequitur to ask about the governor. One might as well ask why they didn't use the President of the US. Why didn't the Arrow say "You have failed this country?" Why does RoboCop only patrol Detroit instead of the whole North American continent? These are silly questions. Lots of stories, especially superhero-related stories, are focused on a specific city. That's an abundantly familiar trope. Why should any more explanation be needed?