Several mayors of Gotham City have appeared in the comic book series that collectively form the "Batman Family" of titles:
The first Mayor of Gotham seen in the comics was unnamed, but drawn to look like New York Mayor Fiorello H. LaGuardia (Batman #12 and Detective Comics #68).
Bruce Wayne was Mayor of Gotham City for a day.Detective Comics #179; "Mayor Bruce Wayne!" from Jan 1952
Mayor Hayes was introduced in Batman #207 (Dec. 1968).
Theodore Cobblepot - The great-grandfather of Penguin. His tenure of office is the longest ever. He is mentioned in Gotham Underground #9 (August 2008).
Mayor Thorndike appears in the flashbacks from the "Made of Wood" storyline (Detective Comics #784-786). He was killed by the original Made of Wood Killer on July 17, 1948.
Wilson Klass - Mayor during Batman's early years. First appeared in the "Prey" storyline from Batman: Legends of the Dark Knight. Presumably the mayor during Frank Miller's Batman Year One.
Hamilton Hill — A corrupt politician elected mayor thanks to the machinations of Rupert Thorne. He became mayor in Detective Comics #511 (February 1982). During his early time in office, he assisted Thorne's attempts to identify and defeat Batman, principally by firing Police Commissioner (and Batman ally) James Gordon......