I've ridden northern Montana a few times: Lolo Pass to Missoula, up to Glacier N. P. (though I stopped short of the Going-To-The-Sun Road) and last summer I rode the Great Divide MBR from Eureka to Helena. For the roads in the mountains, get a triple with at least a 24 inch granny. For the Great Divide, get mountain components - as low as possible - and you'll still probably end up walking up some of the steeper climbs.
It's beautiful country!