Originally Posted by CbadRider
If you keep an upright posture you're using your glutes and hamstrings to push yourself up the hill. Those muscles will help with cycling.
I agree with the conclusion but not with the rationale.
In cycling, almost all the energy is generated by knee extensors (quadriceps group, and specifically vastus lateralis); hip extensors (glutes); and ankle/foot extensors (calf muscles e.g. gastrocnemius), in this order. Relative contribution depends on bike fit / posture but for simplicity you can assume 4:3:2:1 quads/glutes/calves/everything else.
In walking/running, it's harder to talk about energy generation because the process is relatively inefficient, but uphill walking is a decent approximation to cycling in terms of muscle activation. It puts more load on ankle extensors and less load on hip extensors, but it's generally similar. Uphill walking is closer to cycling than running (running loads all sorts of muscles but manages to leave out our most important group - quads).
Hamstrings are not particularly important in either cycling or uphill walking (they play a secondary role in both) but they are worked hard during running.