Weight distribution is critical, and it is a bit of a fine balance, much like doing a track stand. I find that it is easiest to do this by staying seated and crouching towards the front of the bike. Standing on the pedals will tend to put your weight too far forward and make it difficult to achieve smooth power transfer to the wheels.
Smooth Power Transfer is another important aspect. Remember that your rear wheel only has a small amount of friction keeping it from slipping. What you are trying to do is keep the pressure on the pedals strong enough to keep you going up the hill, but not so strong as to make the wheel spin. Things that can help with this are:
- Staying in a seated position
- Concentrating on pedalling in smooth circles, rather than a in separate pushes from each foot
- Using as high a gear as you can manage while still maintaining a reasonable cadence. If you are using your lowest granny gear, it is much easier for your legs to overpower the friction between the tyre and the ground.
Balance, working on your low speed balance by practicing track stands and the like will mean that you are less likely to need to put a foot down, and more likely to be able to recover from a brief "halt" in your progress.