You must defeat Team Rocket.
You have to get the key to the gym in Pokemon Mansion, but after you unlock the entrance, he is already inside there, so it's assumed that he's already in there even before you unlock the entrance.
its actually the 8th gym so you need 7 badges and then it will unlock
the first seven badges are with the gym leaders that you have to defeat
You have to find the key in the abandoned mansion.
first get cindaquil, the get onix then get machop then get weedle or caterpie then get then get pidgey then get swinub onix for gym 1 cyndaquil for gym 2 machop gym 3 weedle or caterpie for gym 4 pidgey for gym five cyndaquil for gym 6 and 7 then sminub for gym 8
there's a key in the pokemon mansion, that you'll need to unlock te gym's door. after that, just use the quiz blocks next to the trainers to get to blaine.
Defeat team rocket in the game corner, Pokemon tower and silph co then receive 7 badges.
After beating team rocket in every place: Mt moon, Pokemon tower, Game corner, Silph co. Then get 7 badges then you can go in the viridian city gym.
You don't until you beat the 7 other gyms. After that fly back to Viridian city and the leader will have returned
you have to beat 7 gym leaders and then beat team rocket at goldenrod city. then he'll let you pass.
Pokemon ruby where is the 6 gym
You have to go to Cinnabar island after obtaining all 7 Kanto badges. After talking to Blue, the old man will move and you can battle Blue in that gym.