When the Ford GT won its class in the famously grueling 24 Hours of Le Mans endurance race last year, it wasn't just a celebration for the team which developed the all new supercar. It was a relief. The victory in the GTE Pro class came 50 years after Ford's historic 1966 win with the GT40, when the American automaker proved (mostly to spite Ferrari) that it could dominate the track in Europe as well as the US. Marking the golden anniversary of that defining moment with anything less than first place would have been a letdown.

But engineers took a huge gamble in the development of the all new GT: They threw out the V8 engine, the kind of engine it rode to victory in the 1960s, which many believed essential to producing the kind of power necessary to win a race like Le Mans. Instead, they opted for the turbocharged V6 EcoBoost, best known for powering the company's F-150 pickup truck—not exactly the same use case.

That choice sent them on a mission to double the horsepower to an insane 647, from just 3.5 liters of displacement. "What's critical for these performance engines is you have to get all the power out of them that you can," says Ben Peterson, a research engineer at Ford.

But they couldn't stop there, they also had to make sure it could survive a full 24 hours on the track. They redesigned the way the engine breathed, using computer modeling software and 3-D printing. They pushed key components to the limits of failure and beyond, and tested the result on the track and in super accurate simulators.

This is the story of the engine that went from hauling hay to hauling ass.