The Rainbow Pass can be obtained from Celio once the player hands him the Ruby Gem that will make his trading machine work. The Ruby Gem is located in a cave in Mt. Ember.
The following shows how to obtain the Ruby Gem for Celio in Mt. Ember.
After talking to Celio about the gem, the player must then proceed to Four Island to get to Mt. Ember. Four Island can only be accessed by the player once he has obtained the National Dex from Prof. Oak after beating the Elite Four.
Once the player gets to the island, the player must head east from where he earlier found Moltres, and he will see a cave guarded by to Team Rocket members.
After beating the Team Rocket members, the player must follow the path until he finds the Ruby Gem.