Mountain biking is more anaerobic than road riding and you will tend to fall into an "energy deficit" (my way of describing it) very quickly. On a road bike if you've got the spinning down pat, you are very efficient at maintaining a good pace and with good aerobic conditioning you can go faster for longer.
Mountain biking on the other hand requires anaerobic conditioning and a fair amount of upper body strength as junkyard mentioned. I've read the articles and the program that a certain strength training coach by the name of James Wilson writes. He strongly believes that the typical training programs that are meant for road riders translate poorly to mountain bikers and your experience is a good reflection of this. His approach is to focus on strength, mobility and conditioning with a strong focus on anaerobic conditioning. Do a google search on "mtb strength training". There are free articles and videos.