How long is the hill? I;v efound that I cna climb 10,000 ft and feel fine once I warm up cause the body has time to settle into the climb. But to be honest, a 1/8 of a mile climb can make most riders feel like they're done. But that's really only because they didn't get a chance to warm up to the short climb.
Same principle as riding to the corner convenicenstore, I will get winded as it usually takes over 5 miles just to warm up. I think that's a big mistake plenty of people make. Thinking they can't do 20 mile because they hard a hard time doing a one miler to the corner.
So it may not be that you are out of shape, you just need more time to warm up to the hill. I have an easier time on a 5 mile climb than I do on a 1/2 mile climb for the same reasons.