I have been reading a lot of Jules Verne's work written in the 1800's. Very clearly science fiction. Mary Shelley's Frankenstein (1818) has some serious science in it also. 

What is the earliest work that is recognized as being science fiction?