I've found that it's best to avoid getting the smell on my hands in the first place (try not to touch the garlic any more than necessary, use rubber gloves, etc.) but if I'm unable to avoid getting the smell on my hands, I've found a few things that help to remove it (these work for onions as well):
First, use COLD water to wash your hands. Warm or hot water will "set" the smell and it'll linger for hours (or even a day or two).
Second, I've had success using salt to wash my hands (baking soda works even better, but it's not as convenient as grabbing the salt shaker). I wet my hands (in cold water), cover them fairly liberally with salt, then rub them together for several seconds. I then rinse the salt off, take a sniff, and repeat if necessary.
I've read (but can't confirm) that rubbing stainless steel on your hands will remove garlic and onion odors. Kitchen stores sell stainless "soap bars" for this purpose, but I imagine a stainless steel spoon or similar object would work just as well.