Ironically, it's actually harder to measure the mass of the Milky Way than that of other galaxies. You'd think that with it being RIGHT THERE it would be easy, but alas. Most of the difficulty comes from (1) the galaxy spans a huge part of the sky, so it takes an extremely long time to observe any particular feature in detail across the whole thing (say mapping the strength of an emission line, for instance), and (2) it's hard to get an overall picture of the galaxy because parts of it get in the way of seeing other parts - there's a lot of dust in the galactic disk that obscures our view of the more distant parts of the disk, and the disk is where most of the stars are.
Stellar mass is actually the easiest mass to measure in astronomy, because you can see it much more directly than other mass components. All that needs to be done is measure the intrinsic (rather than apparent) luminosity of a galaxy, assume a "mass-to-light ratio" and multiply to get the stellar mass. Mass to light ratios are on the order of
$$\Upsilon\sim1{\rm M}_\odot/{\rm L}_\odot$$
So a galaxy with a luminosity a billion times solar has a stellar mass of about a billion solar masses. More accurate estimates get complicated quickly, as you need to account for the initial distribution of stars in the stellar population(s) involved (the initial mass function: IMF), the age of the populations, dust extinction, etc. etc.
Gas mass is not too bad either. Depending on the phase of the gas - whether it's ionized, molecular or atomic (neutral) hydrogen it may be possible to measure line emission. Neutral hydrogen shows up in the radio at 21cm from the hyperfine transition (spin flip). Most of the gas mass is in neutral hydrogen. Depending on conditions, the Lyman or Balmer series lines may be visible (the first Balmer line is called ${\rm H}\alpha$ in astronomy jargon, it's a common one to observe). Molecular hydrogen - the stuff that stars are made from directly, think Pillars of Creation, is tougher to measure as it has no strong emission lines. What's usually done is to measure emission from other molecular species - ${\rm CO}$ is a common one - and assume something about what fraction of the gas mass that species makes up.
Dark matter mass is inferred from things like galactic rotation curves or gravitational lensing, which both probe the total mass of the system. When we get a total mass from one of these tracers, we always seem to come up about an order of magnitude short (I'm using "always" very loosely here). This, coupled with cosmological observations that seem to imply there is a lot of matter ("dust" in cosmology jargon) that is not "baryonic", but is rather something else that outguns baryons a little less than 10:1 in mass.
As to the Milky Way, there are a number (about 10 that I know of) of ways you can try to measure the mass. I've co-authored a paper which uses several methods. One fairly well known measurement of the total (not just stellar) mass of the MW and M31 is this one, which is more than a factor of 2 bigger than the one you quote. Other sources are more in line with your number... the uncertainty is still rather large. Here's another paper that does the total mass with a different methodology (and get about $1.26\times10^{12}{\rm M}_\odot$), and also models the stellar mass, finding about $6.43\times10^{10}{\rm M}_\odot$, which is about the same ballpark as most estimates for the Milky Way.
If you're adventurous and want to get your hands dirty, stellar mass estimates for at least several hundred thousand galaxies from the SDSS are readily available. These are based on the luminosity of the galaxies, more or less as I've described above. Total mass estimates also exist, but I can't recall where they're easily obtained right now, and they're more uncertain.
Jerry Schirmer mentioned black holes in the comments, so I may as well add a note. The MW black hole is thought to be about $10^{6}{\rm M}_\odot$, so less than one part in ten thousand of the stellar mass, and perhaps a millionth of the total mass. This is more or less typical, though some particularly large black holes get up to perhaps a hundredth of the mass of their galaxy, at most. SMBH's are not thought to be the dominant mass component in any known galaxy (though of course they do dominate in the very central regions).
Best Answer
There are numerous distance indicators used for within the galaxy. The most common way is by using intrinsic magnitude. By knowing how bright an object would be if we were close, we can determine how far away it is by how dim it is. There are many types of stars where we have a rough idea of how bright they should be due to characteristics of the star:
Cephied Variables: The original type of variable star that was used by Hubble to determine the distance to the Andromeda Galaxy.
RR Lyrae Variable: Like the Cephied variable, but usually dimmer.
Type 1a Supernova: These guys, unlike the first two, are cataclismic variables. Essentially a binary white dwarf slowly accretes matter from its binary till it reaches the Chandrashankar Limit, after which point it explodes in a very characteristic way (since the mass at the time of explosion is roughly constant).
Main Sequence Stars: Generally less accurate than the first 3, there are some types of main sequence stars which are used to find distances in a similar way.
There are a few other ways we can measure distances:
Perpendicular Movement: For example there is a "light echo" from SN 1987A which is essentially light from the supernova interacting with dust around the old star. Since this echo should be expanding at the speed of light, we can tell how far away the nova is by the angular velocity of the light.
Relative Velocity in a Moving Cluster: (see dmckee's answer)
Tulley-Fisher relation: A relationship between the luminosity of the galaxy and it's apparent width. Can be used as a decent distance calculator.
Faber-Jackson Relation: Similar to Tulley-Fisher, relates luminosity with radial velocity dispersion rate.
EDIT: Some more information about redshifts.
The whole relationship between redshift and distance was in fact established by Hubble by relating distance to Cephied variables (I believe) with redshift. Later on it was made more precise using supernova, which are brighter and can be seen from much father away (I think recent supernova can be occasionally seen around Z=2, while Cephieds are all Z<1). Within a galaxy, redshift cannot be used directs since the "peculiar velocity," the velocity within the galaxy, completely overshadows the effects of universe expansion on which Hubble's Law is based. Redshift within the galaxy is useful for certain other techniques.
EDIT: corrected a few minor errors.