Going uphill is one time when you really need to think about your lungs tidal volume. We generally only breathe out a small proportion of the air in our lungs. The rest is like the tide, hence the name, as just as it is about to escape you breathe in again and it recedes.
The result is that the tidal volume is low on oxygen, so unable to help oxygenate your body and particularly your muscles, and with low oxygen your muscles tire. Concentrate when going uphill on emptying the lungs so the tidal volume is as low as possible. Deep slow breaths in and out, every so often, will increase the oxygen levels and get the tiredness out of your legs, allowing you to increase your speed or plod on for longer, whichever you prefer.
This assumes of course the oxygen has some fuel to burn, so keep your blood sugars up through regular snacking if you can, but particularly before long, or steep, or both ascents.