Other than cadence (which is certainly very important), a lot has to do with how you set up your bike.
Too extreme in any factor like saddle height and fore-and-aft tends to rob you of power, which becomes especially evident on hills. Some conventional wisdom you can read about on the internet may be wrong for some people, like the idea that the saddle should be farther back. The thighs can put down a lot of power like that, but they also tire very quickly.
Good positioning of the handlebars makes a big difference also, because you want to lean forward without being too stretched. It's hard to explain, but it's kind like making your body into a big spring (and this involves both the arms and the legs). A spring isn't good for anything if it's already stretched out). The hoods need to be where they are optimal for both seated and standing climbing so you can do both efficiently.
But no matter what you do, hills are always hard if they are long and steep enough, and as you get older, it gets worse. So it helps to have good gearing for it when you need it. That's why I spec'd my road bike with a racing triple. I don't actually use the small ring that often, but it's there if I feel the need to use it. It can be essential in maintaining a good cadence when climbing.