Do you really want to master long climbs?
All of the aforementioned excellent advice,
plus:
Ditch the gym for at least 8 months of the year. Start doing casual 100 mile training rides, and gradually increase the intensity. Consider 140 mile training rides, finish at the same pace you started at, and that will be a big enough effort. You are not interested in arm wrestling here.