There are also a few dragons scattered throughout greek mythology, most notably the dragon Ladon who guarded the three golden apples in the garden of the Hesperides. When he was slain by Hercules during his eleventh labor, Hera placed him in the firmament as the constellation Draco.
Although this is mostly conjecture, I believe that D&D dragons had their origins with Smaug. Tolkien created Smaug based on various teutonic dragons such as St George's dragon, Fafnir and Beowulf's dragon. He elevated Smaug however from simply a rampaging monster to a wily and beguiling creature. Red dragons were most likely the first D&D dragons to challenge players in Gygax's and Arneson's adventures, essentially carbon copies of Smaug (red scaled, bat winged reptile, fire breathing, intelligent and evil, who hoards mounds of gold). The other chromatic dragons were probably created in short order to keep challenging players. It was a relatively easy job: keep changing the colour and breath weapons and the PCs won't know what to expect. The other Smaug-like qualities stayed pretty much the same (bat wings, intelligent, lots of treasure). The true Smaug-like clones, the reds, remained the strongest, smartest and coolest evil dragons however.
After DMing a rainbow of evil dragons, Gygax probably wanted to surprise his players with something entirely new: good dragons. The first metallic was the gold dragon. Gygax, who was the lead designer of the original Oriental Adventures hardcover, had a certain fondness for asian myths. Of all dragons, the golds are most closely tied to the oriental dragon model (wise, beneficient, longer, sinous and with whiskers). Because in D&D good must always triumph over evil, the golds were created to be even stronger then the Smaug-like reds. The other metallics were probably created in short order afterwards to mirror the five chromatic dragons species; each with a different colour and breath weapon.
If anyone has any historical information that contradicts this, I'd love to see it.