You unlock the gym by heading to the Underwater Cavern, where Team Aqua/Magma attempt to awaken Kyogre/Groudon and fail, causing it to go to the Cave of Origins in Sootopolis city*. After either catching or defeating Kyogre/Groudon you may then enter the 8th gym. For Sapphire and Ruby.
*In Emerald you need to head to Sky Pillar and awaken Rayquaza to help you calm down Kyogre and Groudon which then become available after beating the elite four, but the gym unlocks afterwards and at the top of sky pillar Rayquazza can be caught (lvl 70).
To get to Sootopolis City's 8th gym, you must do a few things first:
1) Go to Team Aqua's underwater hideout on Route 128 off of Mossdeep City, get through till the end, and beat Aqua's Archie. After you beat him, it'll go to a cutscene. The world will start to flood, and you won't be able to stop it until you catch or defeat Kyogre (the ledgendary in Pokemon Sapphire).
2) NOW, you may go to outside Sootopolis (the big white rock on Route 126). Now, dive near the bottom part of the island. Swim around until you find an entrance, and swim into it. It'll lead into a small cavern. Surface from here, and you'll be on to step 3.
3) Welcome to Sootopolis City. Now, even though you would think so, the gym is NOT YET UNLOCKED. You must go to the Cave of Origin, which is located at the top of the city.
A quick note...The Cave of Origin can only be reached from the left side of the city.
4) When you get close to the Cave, Steven will stop you and speak with you. Wallace, the 8th Gym's leader, will also speak with you. They will lead you down to the Cave now.
Note...You will need a Pokemon with Flash for the Cave.
5) The Cave isn't terribly tricky to get through. But you need to grab HM07 (Waterfall) while you're in there. It's sitting in in corner of the 2nd level.
6) Once you get to Kyogre, your Blue Orb will begin to glow, and you will initiate a battle. Kyogre is level 45. I wish I could tell you how hard he is to defeat, but I've never done it. I always simply catch him with a Master Ball. The moves he knows are Hydro Pump, Calm Mind, Body Slam, and Ice Beam.
7) Congratulations, whether you got him or defeated him. Now, either use an Escape Rope, or walk back out of the Cave. Steven and Wallace will commend you.
8) Hooray! The 8th gym is now available! I hope this was helpful.
capture or defeat kyogre
Defeat the eighth gym leader.
Catch groudon
you go to the Pokemon mansion next to it and at the very end of it is the key to the gym
Go through the cave of origin.
You beat the TRAINERS first then the doors unlock and you can go through them ^^
You have to get Kyogre and then go to the ciuty it is in and got to the chamber.
Sotololips City
Sootopolis. You have to go through the whol Kyogre episode then the gym will open up. (Sootopolis is the white place you have to dive to get into.)
After the eighth gym? Or after Pokemon league? well, for eighth gym, i recommend.. I got nothing, but for after Pokemon leagu, they give little exp, so Red.
The eighth gym is back in Viridian City, where you have already been, but it won't unlock until you have all of the rest of the badges. Once you defeat Blaine at the Cinnabar Gym, you can take Route 21 back to Pallet town and either continue to Viridian, or fly there. The gym leader is someone you have met before.
it is a dragon type Pokemon gym
The third gym leader in Pokemon Sapphire is Wattson and he is located in Mauville City.