You've probably answered your own question. I had this problem on my old '86 Ford Ranger, when it was only one year old. The hold down bolt on the distributor loosened up by itself and the timing was waaaaay off. As a result, the exhaust manifolds were cherry red and their was no power to speak of.
After resetting the timing and tightening the bolt, the truck ran like it did before.