After you learn the secret technique Chop Down aboard the S.S. Anne, you can challenge the Vermilion City Gym.
Battle Trainers in the Gym
Go north and talk to the Sailor to battle Sailor Dwayne, who has a level 22 Magnemite. You get 1320 Pokédollars for winning.
The Sailor gives you a hint about how to find the switches to remove Lt. Surge's barrier: the two switches are in two trash cans that are next to each other.
To the left, you can battle Rocker Baily, who has two level 22 Voltorbs. You get 616 Pokédollars for winning.
The Rocker gives you another hint: there are no switches in the trash cans next to the red trash can.
In the northeast corner, you can battle Gentleman Tucker, who has a level 22 Pikachu. You get 2640 Pokédollars for winning.
Tucker gives a final hint: check a trash can next to a blue trash can.
Based on the clues, the correct switches could be in any of the trash cans surrounding the blue trash can, except for the trash can to the left of the red trash can. The question marks in the diagram below represent the possible locations of the switches.
? ? ? x x ? B ? x x ? ? x R x
Check on the middle trash can, and the one above it, to deactivate the barriers. The "o" in the diagram below represent the correct locations of the switches.
x x o x x x B o x x x x x R x
After deactivating the barriers, go to the end of the gym and talk to Lt. Surge to battle him.
Lt. Surge has a level 25 Voltorb, a level 26 Raichu, and a level 25 Magnemite. You get 4160 Pokédollars for winning. After the battle, you get a Thunder Badge. Lt. Surge also gives you his autograph, and TM36 Thunderbolt.
After the Battle
Go outside, and when you go to the east, Misty will heal your pokémon for you. She offers to lead you to Diglett's Cave. It's east of Vermilion City. When you're ready, go into Diglett's Cave.