I reckon that cyclists will fall into two camps when it comes to hills - the 'no pain no gain' group and the 'no pain' group.
If you're in the latter group, hills will always be a problem as you'll be forever in granny gears. If you're OK with some pain (muscles only - if the pain's in the joints, you're doing something wrong), then trying to climb hills in a bigger gear than usual, out of the saddle if necessary, for as long as you can will strengthen muscles and improve your tolerance for lactic acid. As others have said, there's only really one way to get better at climbing hills (although weightloss does help) and that's by climbing hills.
Part of it's technical though - knowing what gear to be in, whether you can honk up a hill or should be prepared to change down, how much to climb out of the saddle or whether to stay seated, whether to slide backwards or stay forwards on the saddle, how to hold the handlebars (some prefer to stretch onto the hoods while others prefer an overhand grip on the bars either side of the stem) to best effect. Like CV fitness and endurance, some of this knowledge only comes with getting out there and climbing hills.