You need to acquire the Secret Key that can be found in the basement of the Pokémon Mansion and then you can use the Secret Key to enter into Blaine's Gym.
Chat with our AI personalities
bottom floor of Pokemon Mansion
its actually the 8th gym so you need 7 badges and then it will unlock
Find the secret key in the Pokemon Mansion,( Next to the gym)
The first gym is in pewter city.
The 5th gym is the Fuchia city gym Gym leader Koga