Great answer
There is also the difference in bike weight to consider. One of my road bikes, a Cervelo R3 with a carbon-fiber frame, weighs 17 pounds versus 27 pounds for my Stumpjumper FSR Comp mountain bike. As you mentioned, the increased rolling resistance of those wide 26" knobbies versus narrow tires with no tread is a big factor. In fact, I think it is a much bigger factor than the 10-pound difference in weight between my two bikes. I say this because I have a LeMond road bike with a steel frame and even though it weighs four pounds more than the carbon bike, my average speed is the same on both and that applies to riding in both mountainous country as well as rolling hills.
I don't believe the difference in gearing alone between a road bike and a mountain bike has any bearing on speed. I have another steel-frame road bike rigged up for really brutal climbing but I also occasionally ride it in easier country. It has a triple chain ring, a 12-34 cassette and a mountain bike derailleur. In other words, it is geared the same as a mountain bike. It also weighs the same as my other steel-frame bike and my average speed on it is exactly the same as on the other two road bikes.