Reaching the seventh gym in Pokémon Emerald means traveling to Mossdeep City, and you will need the HM Surf to get there. After you defeat Team Magma or Team Aqua in their secret hideout in Lilycove City, the Wailmer that was blocking your path will move.
Once the way is clear, surf past where the Wailmer used to be and keep heading right. Continue on and you will eventually arrive in Mossdeep City, where the seventh gym awaits. As a nice bonus, you can also pick up a Master Ball inside that hideout. So after clearing out the villainous team, just keep surfing east and you will find your way to the next gym leader.