You have to catch Kyogre and Groudon.
well i forgot
This is because you have to go in the cave at the top of the town then the gym will open.
Go to Sootopolis.
The Pokemon league!
Emerald: He is the champion of the Elite Four; Juan is the Sootopolis gym leader. Sapphire/Ruby: He is the gym leader of Sootopolis.
sootopolis city
sootopolis city
In the sootopolis city gym.
you have to distory the door
In Sootopolis City.Trainers and Gym Leader uses Water-Type Pokemon.
by defeating juan at the sootopolis gym
To do this, you have to have beaten the gym at Sootopolis. To get there, you have to have beaten the gym at Mossdeep and the Magmas at the space center to learn dive. Once you beat Juan at the Sootopolis gym, he will give you it. Hope I helped! :)