I always used to hear that "the whole nine yards" originated from nine yards of belt fed ammunition on aircraft machine guns. But it pre-dates WWII, and first appears in print in 1907. That means that it was probably floating around in speech since at least the 1890s.
And it also means that the second machine gun theory, a British Vickers, is out too. The Vickers went into service in 1912.
https://en.wikipedia.org/wiki/The_whole_nine_yards
The best explanation I've heard so far is that it's related to standard lengths of fabric, used in the garment industry, which were usually cut into lengths of 3, 6 or 9.
Or, that it means nothing. And that it's just a turn of phrase, like "the whole shebang". Though, in the 1870s, I think "shebang" referred to a vehicle.
http://www.phrases.org.uk/meanings/the-whole-shebang.html
So who knows...