Coordinate your muscles for hills.
Climbing speeds are naturally going to be lower speeds where your normal low and aerodynamic positions on flats and descents are not as important. If you are trying on flat roads then you can build strength and coordination in your pedaling muscles by riding intervals with your hands on the top of the bars which mimics an upright climbing style. This riding position makes wind resistance greater, to push you a little bit more.
Build staying power.
By far the biggest challenge of a long climb is maintaining a strong pace, especially when you are running out of gears and the gradient is beating on your knees. You can train on the flats by building fatigue resistance and strength endurance.
Train once a week at a lower cadence, something around a 65-75 cadence. You wouldn't want to climb at this cadence, but as many have said "train hard, race easy."
Both short and long intervals are great, whether you are training for climbs or not. Short intervals should consist of five or six 4-5 minute efforts, riding as hard as you can during that time, then take a minute rest at an easy pace between intervals.
For long intervals, try 12-20 minutes as hard as you can during that time. You can then take a few minutes rest at a slow pace between. Do 2-3 intervals.
You could also do very short intervals, like four 30 second sprints with a very short easy pace rest in between intervals.
Give me 20 reps.
Often times riders will get out of the saddle to climb for a bit and change up positions for their suffering legs. This is fine, but when you do this you put more pressure on your arms. Make sure to hit the gym and do some push ups and tricep dips as a way to strengthen up your arms.