A fourth factor to add to EmmCeeBee's list is air resistance. A typical touring bike will be set up for a more upright posture than a road bike -- therefore, more air resistance -- but not as upright as a mountain bike.
The biggest difference, though, always comes from the rider. Take a dozen riders and a dozen bikes of wildly varying types, assign the riders to the bikes at random...and for the most part, the faster riders will still be faster, no matter what they're riding. (I know this because I'll be the one getting passed, no matter what everyone's riding!)