Don't worry about its attack. Dugtrio is awesome. It's got blistering speed, so you can count on it to always go first in battle. Its attack isn't that bad, anyway. If you're lucky enough with Magnitude, then you can pull off some good hits, and if that doesn't please you, then Dig does much more reliable damage, though sometimes not as strong. Mud Slap is also great at annoying. The only problem is that it can't touch Flying-types unless you give it Cut (or Slash at a higher level. Don't bother with Fury Swipes; it's fairly inaccurate and gets annoying after a while because of that). Another problem is that it's frail, and can't take hits very well. The good thing about this, though, is that NPCs aren't smart in the least and usually use relatively weak moves, meaning Dugtio should be able to stand up to a couple hits in battle... but don't count on that when you're up against a hard-hitting pokemon, like Machoke or Kadabra.
All in all, it's a very useful pokemon. If you get it up against the right opponent, it can be devastating. It evolves from Digglet at a conveniently early level, too. If you have one, you're pretty much guaranteed to beat the electric gym. I would highly suggest using one.