You go to the dragon's den (you need surf for this) then you go up the gym and there will be a house up ahead and you have to fight the old guy in the back. After that the gym leader will come in and give you your badge.
If you mean the Wifi Plaza, then it opens after you get your first or second badge I think.
By mystery man you mean the one in DPt? (Diamond, Pearl, and Platinum) the one that gives you items for your secret base. if that's the one he isn't in HeartGold or SoulSilver....... sorry :( hope i helped :)
First, go in the Gym and beat Claire. She will then refuse to give you the badge until you go to the dragons den. Exit the Gym, and surf behind it. There will be a cave there. Go in, go around, and take the test to be a dragon master. You need Whirlpool to get through. After this, she will give you the badge. Leave the cave and head to the Elite 4. Good luck.
* Pewter Gym - Rock Badge * Cerulean Gym - Cascade Badge * Vermillion Gym - Thunder Badge * Celadon Gym - Rainbow Badge * Fuchsia Gym - Soul Badge * Saffron Gym - Marsh Badge * Cinnabar Gym - Volcano Badge * Viridian Gym - Earth Badge
1.Brock 2.Misty 3.Lt. Surge 4.Erika 5.Koga or Janine (depending on which game you have) 6.Sabrina 7.Blaine 8.Giovanni or Blue (depending on which game you have)
KANTO
You can't get a HM for that.
by beating the gym leader
beat falker with a senret lv100
Go to the forth gym!
You can find it at the town team rocket is defending
cinbar islnd
you have to get the cianwood gym badge and the olivine gym badge
by beating the icicle gym leader. In mahogany town.
In Mahogany town right from Etrack city
blackthorn city
it is bugsy the bug type leader