Going north from Stockholm and Uppsala by either train or car, you will pass Gývle if you stick to the mainline / E4 motorway north. There are slow trains but also speedier X2000 trains (Stockholm to Sundsvall run) which take you here in less than two hours from Stockholm. Also train and buses from for instance Falun in the midlands.
Unless you are driving yourself, so far the best way to get to Gävle is by train. It is right on the "main" railroad from Stockholm up north, so almost every train passes through.
Also, it is comparatively cheap to travel by train here from Stockholm (the starting point for many tourists I would imagine) or Uppsala.
OK, by bus it's a LITTLE cheaper, but train is much faster, so I don't think it's worth holding on to your pennies (ören, or SEK - Yes Sweden does not yet have EURO - We vote in september, then we'll see...) in this case.
Trains will depart every hour or so, but not all night.
See my main Sweden page for details about communications in Sweden...!
To Gävle you can go by either car or train. The X2000 fast train can get you from Stockholm to Gävle in just 80 minutes. There are about fourteen departures everyday and all of the trains go past the main airport Arlanda.
The main roads E4, R80 and R67 all goes through Gävle. If you drive on the road E4 from Stockholm you will reach Gävle in less thatn 2 hours.
While the train is the fastest, it is good to keep in mind that usually you have to drag your luggage on and off the train (common space in passenger compartment). The bus has an easy to access cargo hold underneath the passenger compartment that fits more luggage. And they usually provide some assistance.