Keep the Effort Constant
A common mistake of novices is to sprint too heavily at the beginning of the hill, and blow up halfway. However, the typical advice -- starting the hill slowly and accelerating near the top if you can -- is terrible in terms of overall speed and conserving momentum. My advice is to still sprint up the hills, but to pick a fixed level of effort that you think you could sustain for half-again to double the length of the hill -- you'll need it, as we'll see later.
Keep the effort (rather than speed) constant, and downshift as soon as you feel you're not spinning freely, as the hill eats into your approach speed. If your pedalling seems to slog, resist the temptation to battle a big gear and accelerate until the cadence is right; if you couldn't even sustain a given speed, accelerating back to it on a hill will be even more difficult. Instead, downshift. If you want to regain your speed, then downshift, pedal hard, and shift up back once you get the legs whirling.
That said, keep an objective speed range in mind for a given steepness of a climb. Unless the hill is steep, learn what you are capable of and defend your speed when it hits a specific value, say 20 kph on a moderate hill. Watch your speed, and know your limits. On a moderately steep hill early in the season, I don't let myself exceed 33 kph, even when I still have some momentum left. I just ease off the pedals and continue up at an effort that's sustainable. While you can feel for breathing and the burning of lactic acid buildup, sometimes you speedometer or HRM is the only indication that your pace in unsustainable, because in many cases I know that I'd never have felt it until it was too late.
When the hill starts to taper off, push backwards and forwards on the pedals, and ankle until your legs are whirling. Then upshift once and spin and continue to accelerate slowly.
Don't Hold Back
Don't hold back when riding on hills. This isn't to say hammer 'till you honk, but ride at the most brisk pace that you feel capable of. As long as the pace is sustainable, you don't gain anything by holding back, but you get where you're going much more slowly. As your effort is diluted the least by wind resistance, hills are the very best time to pour on the power (provided you leave enough to accelerate to cruising speed on the way back down).