You start out talking about tractors, then your example is comparing a passenger car to a heavy-duty pickup truck?!?!?
Well, if the Toyota had 12-15 speeds forward properly spaced the Toyota would win easily. If the Toyota only had three speeds the truck would win. The other thing you have to keep in mind, a diesel engine will almost always be larger displacement and much heavier than a gasoline engine of same HP. And as long as you keep them in their operating range of RPM they will perform similarly. The dyno's they test tractors on at the Nebraska test labs are the exact same regardless of what fuel the engine burns. The rules for testing HP are all cast in stone by the SAE and ASAE. There's only one set of rules.
I've run 200-225 HP trucks over hundreds of thousands of miles hauling freight. Some gas powered, some diesel. There really isn't that much difference in how they perform. Number of transmission speeds, the RPM drop when shifting up makes much more difference than what fuel the engine burns. Yes, the gas engine will burn more fuel, sometimes a LOT more fuel, but the bottom line is cost per mile. And more companies are switching back to gasoline fueled trucks for their light and medium duty needs. Second year I hauled ready-mix cement between my Soph & Jr year in college my 1966 White had a 165 HP Cummins, and TWENTY forward gears and four reverses in a 52,000# truck. Some hills I could not downshift fast enough, I had to slow to a speed the truck could crawl up the hill and let the cars pile up behind me!
I'm keeping my 20 year old diesel pickup with 301,000 miles, it runs good, paid for, but twenty years of use has caused issues, rusted power steering, fuel, and brake lines, I've spent $2000+ on those the last 3-4 years! If I bought a new truck today it would most certainly be gasoline powered. They're cheaper to begin with, fuel & maintenance is cheaper, probably have to be a RAM, they're the only company that still puts a manual trans in them.