As I understand it, until very recently (the early 20th century), people assumed that our galaxy was the only one in existence - basically, up to that point, the words "galaxy" and "universe" were synonymous. And if I'm not mistaken, it was Edwin Hubble who finally proved that the universe is actually far bigger than we had ever imagined. We gradually discovered more and more galaxies, and at present count (or at least estimate), the Milky Way is one of hundreds of billions of galaxies in an unimaginably large (yet finite) universe.
Did any fictional works anticipate this state of affairs? That is to say, did any authors, prior to Hubble's discovery, suggest that the universe contained more than one galaxy?
Note: The ancients came up with the idea of a "Galaxy", but the concept was quite different from our modern understanding of the term. The word galaxy is actually based on the Latin and Greek words for "milky" (hence the name of our own galaxy, "the Milky Way"), and referred to the appearance of the milky band of light that stretched across the night sky, before the invention of electrical lightning ruined the sky and made this band of light invisible from most places on the planet. The ancients didn't know what the milky band of light was, and they certainly didn't know it was an outer arm of a spiral galaxy.
late Middle English (originally referring to the Milky Way): via Old French from medieval Latin galaxia, from Greek galaxias (kuklos ) ‘milky (vault),’ from gala, galakt- ‘milk.’