The most common way to measure the distance to a reasonably close galaxy is the "standard candle" method.
Some very luminous stars change in brightness at a rate which corresponds to their exact luminosity.
These stars are known as Cepheid variables, after the archetype discovered in 1912 in the constellation Cepheus.
The astronomer responsible for the breakthrough was
Henrietta Leavitt.
With the help of Miss Leavitt's breakthrough discovery, astronomer
Edwin Hubble in 1923-1924 provided proof that
"spiral nebulae" were really galaxies; island universes like our own Milky Way.
Get on the APOD PING list! 
Some very luminous stars change in brightness at a rate which corresponds to their exact luminosity.That ring a bell. My memory's getting rusty so please correct me if I'm wrong, but didn't Milne later use this same light oscillation and the red shift to demonstrate that the nebulae were once confined to one region of space? Therefore, the most distant galaxies appear to be accelerating away from us.
The world sure has gotten complicated since Cepheid variables were discovered. That was the Golden Age of observational astronomy. Now raw data is coming in much faster than it can be analyzed and astronomers are losing ground. The new big telescopes are awesome, Hubble isn't the only big tube in town.