The GT40 was originally a small-block-powered car. There were even attempts to run the aluminum overhead-cam "Indy" motor in them, but the 289 was ultimately settled upon. Those cars are known as "Mark 1" GT's and it was in that configuration they ran Le Mans for 1964 and '65. Although plenty fast--I think the 289-powered cars ran up to 217 mph on the Mulsanne--they did not finish either race. A lot of this was probably due to Ford being new to the game and learning as they went (similar to the Audi team the last few years, which followed much the same timeline before becoming dominant). Shelby got involved in '65 and in many ways completely rebuilt the cars, replacing the wire wheels run in '64 with alloy Halibrands, strengthening parts, revising the bodywork, etc. Ken Miles was the chief development driver and Phil Remington lent his master fabrication skills to the task.
With the advent of the FE 427, it was decided that bigger was probably better and the engine was transplanted into the '40. These cars were known as MkII models. They had bigger front fender bulges and greatly revised rear bodywork in order to cope with the big-block's cooling needs. These cars were tested in several different body configurations, with longer noses, rear "fins", etc. Roadsters were built along with coupes (as had been the case with the Mk1). An automatic transmission was even tried at one point, and cars were run at least once with "Mercury" badging replacing the Ford logos, to give that division an advertising boost (good trivia). The MkII was tested and tested, engines were run on Ford's dynos with programs designed to replicate the Le Mans gearshift and rev range demands, and the cars became world-beaters. The MkII had its shining moment at Le Mans '66, with three team cars participating in the controversial "photo finish" where some felt Miles had been robbed of victory by a rules technicality.
For '67, Ford prepared another assault on the 24 hours with a car that, in many ways, was not a GT40 anymore, the MkIV. The IV retained the 427 but had new, aircraft-style honeycomb material for its monocoque and used completely revised front and rear bodywork that made it appear much longer than any Mk1 or II. The MkIVs--there were 12 built, I think--have serial numbers that start with the letter "J", a nod to the prototype that spawned them, the "J" car. The "J" was originally intended to be the successor to the MkII GT40. It had different bodywork from how the MkIV's ultimately appeared, but many of the underpinnings eventually became the MkIV. Ken Miles was killed testing a J-car at Riverside in 1966, which set the whole program back quite a bit. The cause of his accident was mysterious, and cast a cloud over the whole J-car program, which may have led to it ultimately being scrapped and reappearing as the MkIV. At any rate, Gurney and Foyt scored their famous win in a IV at Le Mans '67. They decided before the race that, since nobody gave them a chance to survive to the end, they were going to drive the hell out of the car and have fun with it. About 20 hours later they realized they might win, and then started to worry about whether they had abused their MkIV too much. It didn't break, they set new speed and distance records, and Gurney started a tradition of the winner spraying champagne that continues today (another bit of trivia).
After Le Mans '67 Ford felt it had nothing more to prove, and pulled out of endurance racing. Also, the FIA, in an attempt to slow the prototypes down (the MkIV's were running close to 240 mph on the Mulsanne), limited engine capacity to 5 liters. This obviously eliminated the 427 as a viable option but opened the door back up for the use of the Ford 289-302 series of engines. John Wyer, famous race team manager who had worked for Aston Martin for several years, had already been runnning modified Mk1s at Le Mans in '67. His modified cars, which featured a narrower cockpit area, were called "Mirages". For '68 he returned his cars to more "standard" Mk1 spec, albeit with much wider rear fenders to cover wider tires, and took the fight to Ferrari and Porsche in the now-famous Gulf-liveried GT40s. Car #1075 won in '68 for Wyer. The same car returned in '69, and, in the closest Le Mans finish ever, Jacky Ickx and Jackie Oliver won by a few yards over a Porsche 908.
The GT40 was really a dinosaur by 1969. Its reliability won the day after many much faster cars had left the race. The next year saw the beginning of the domination of the Porsche 917. Wyer had switched his Gulf sponsorship over to them by then, and the '40's days in the sun were over...
Sorry for the rambling post but I thought you guys might find it interesting. I apologize for any historical inaccuracies but this is from memory...
Bob