Crawlin' up, flyin' down
Join Date: Jan 2006
Location: Democratic Peoples' Republic of Berkeley
Bikes: 1967 Paramount, 1982-ish Ron Cooper,1986 De Rosa Professional, 1978 Eisentraut "A," 1961 BianchiCompetizione, 1994 Trek 520, 199? Burley Bossa Nova, early-1970s Cinelli Speciale Corsa
Being in better overall riding condition will improve your climbing, so working out on the trainer, by helping keep you fit, will help your climbing.
This is assuming that the choice is between riding the trainer and not riding at all because of timing and/or weather issues. If the choice is between riding the trainer and hitting the climbs, hit the climbs. As a general matter, the best way to get better at/train for a particular cycling skill is to do it, over and over and over. For example, if you want to ride at 24mph, then ride 24mph. At first, you won't be able to do it for very long at all. But if you keep at it, the distance you can travel at that speed will get longer and longer. (Why you would want to is a different question.
"I'm in shape -- round is a shape." Andy Rooney