The Electric-type Gym is located near the south-west of Vermillion City. After acquiring the Chop Down secret technique from the Captain of the S.S. Anne, you can slice the skinny tree blocking the entrance. Inside, there's a puzzle that you must solve to challenge the Gym Leader.
Know Your Match-Ups: Electric
Electric-types are weak to Ground-types only and their attacks do no damage to Ground-types. Therefore, Ground-types are the perfect counter. For reference, they're strong against Water and Flying, but do less damage to Grass and Electric--and Dragon, if you have any.
Now, you may have noticed the red and blue-coloured bins. Those are actually red herrings (uh, is one of them a blue herring?). The bins you actually want are the middle bin along the top row, followed by the bin directly below it, in that exact order. Check those two bins in the right order and the electric fence will vanish.
If you're smart, you can actually reach the two bins without battling any trainers. To do so, we recommend going around from the right side, then approach the first bin from the top or sides. Next, without going below the first bin, position yourself so you're standing to the right of it.
Then go down towards the Sailor below, but don't speak to him obviously. While standing above him, inspect the second bin from its right. That way, you won't be seen by the trainer towards the left, who's looking your way. But you may want to battle the trainers anyway for the experience and for the glory!
From bottom to top:
By now, you've probably seen your fair share of Magnemite. Thanks to its Steel-type, it takes a heavy 4x damage from Ground-types. You could probably shake the ground near it and it'd faint. Fire and Fighting-types are also good.
Honestly, it can't get much simpler than this. Well, actually, the first Voltorb can use Self-Destruct, which can deal some hefty damage. It's fast too, so don't be surprised if it uses it. The second one isn't so bad.
This Pikachu doesn't have any Electric-type attacks for some reason, but it can use Thunder Wave to cause paralysis. So you should still use a Ground-type if possible.
Gym Leader Lt. Surge
There aren't that many Electric-types to choose from, so this shouldn't be a difficult battle if you came prepared. Voltorb can use Light Screen to halve special-based attacks for a few turns. Most Ground-type moves are physical, so no sweat.
Magnemite is an easy win for a Ground-type. But if you want to let them relax for a bit, you can switch in a Fire or Fighting-type instead. But only if your Battle Style is Switch, unless you're a masochist.
Finally, we have Lt. Surge's famous Raichu. Please resist the urge to send out Pikachu like in the cartoon. Actually, if it's your partner Pikachu, it could probably handle it. But a regular Pikachu is going to struggle.
Instead, we suggest a reliable Ground-type. That way, Raichu will be stuck using weak moves like Quick Attack and Double Kick. You've got loads of options, from Geodude, Onix, Diglett and the fully evolved Nidoran.
Survive Lt. Surge's shocking assault and he'll hand you his Thunder Badge plus his Autograph. So how much can we sell this for? Oh, he'll also give you TM36 Thunderbolt. If you didn't get the chance to see it, it's a very strong Electric-type move.
That's three Badges under your belt! When you leave the Gym, you should see Misty standing by the Poké Mart. She'll offer to lead you to Diglett's Cave, towards the east of Vermillion City. Refuse or not, you'll want to go there if you want to make progress.