The dawn of extragalactic astronomy was in 1917, when American astronomer Heber Curtis observed a stellar nova within M31, the formal name for what was then called the Great Andromeda Nebula. At the time, spiral nebulae such as Andromeda were thought to lie within our own galaxy, with a size only several times larger than that of our solar system and a distance less than 50,000 light-years. They thought the Milky Way Galaxy represented the entire universe.
After observing the nova in M31, Curtis searched the photographic record, noticing 11 additional novae in the region. If M31 was just a stellar nebulae, why were there so many novae within it, and why were these characteristically fainter than other novae? Reasoning from the observation that these novae were about 10 magnitudes fainter than novae known to occur in our own galaxy, Curtis declared that the Great Andromeda Nebula was in fact an "island universe," distinct from the Milky Way and located 500,000 light-years away. Astronomers did not accept his hypothesis at first, and a scientific debate began.
In 1920, Harlow Shapley, another American astronomer, challenged Curtis to a Great Debate on important astronomical issues of the time, including whether spiral nebulae like Andromeda were really outside our own galaxy. Many fellow astronomers followed the debate, but the final results were inconclusive. It was not until 1925, when Edwin Hubble (after whom the Hubble Space Telescope is named) published observations from the 100-inch Hooker telescope, then the largest in the world, that he had discovered Cepheid variable stars in the Andromeda nebulae and used them to measure its distance, found to be an enormous 2.5 million light-years. The era of extragalactic astronomy had begun, and the Andromeda Nebula was renamed the Andromeda Galaxy.
For the past 80 years, extragalactic astronomy has been an active area of research. By measuring the relative speed of galaxies using their optical signature, it was found that all galaxies are moving away from each other and the entire universe is expanding. In 1998 observations of Type Ia supernova even suggested that the expansion is accelerating. Cosmologists now think it is likely that the universe will end in a "Heat Death" where accelerating expansion causes all matter to disperse and freeze.
An important episode in extragalactic astronomy is the discovery and investigation of quasars, QUasi-stellAR radio sources. These bright point sources were known to be very luminous and very remote, among the most distant objects known, with some as far away as 13 billion light-years. Although quasars were first observed in the 1950s, it wasn't until the 1970s that a scientific consensus began to emerge on the nature of quasars: they were active galactic nuclei, consisting of supermassive black holes sucking in several solar masses worth of material per century and releasing tremendous amounts of radiation in the process. Formal models have been built to describe this, and one of the greatest mysteries in extragalactic astronomy was solved.
Today, millions of galaxies have been photographed and classified by scientists, sometimes even using the help of the public (as in GalaxyZoo). Galaxies are either spiral or elliptical. It is estimated that there exist about a hundred billion galaxies in the observable universe. Interestingly, this is about the same as the number of neurons in a human brain.