Dan Cody was an enormously wealthy old man, a millionaire many times over, who had earned his fortune mining silver. Gatsby met him when Gatsby was seventeen--a runaway with no money and no prospects. When he saw Dan Cody's yacht drop anchor at a dangerous point in Lake Superior, Gatsby saw an opportunity to leave his old life behind and took it:
It was James Gatz who had been loafing along the beach that afternoon in a torn green jersey and a pair of canvas pants, but it was already Jay Gatsby who borrowed a row-boat, pulled out to the Tuolomee and informed Cody that a wind might catch him and break him up in half an hour.
Cody found Gatsby to be smart and ambitious and hired him. Cody fitted him out with a nautical wardrobe, and the Tuolomee set sail for the West Indies and the Barbary Coast with Gatsby aboard. For five years, Gatsby worked as Cody's personal assistant, of sorts, as a "steward, mate, skipper, secretary and even jailor [sic]." (Gatsby "jailed" Cody when he was drunk and needed to be restrained.) Together they sailed around the continent three times.
During the time he travelled with Cody, Gatsby experienced a glamorous life far removed from his North Dakota upbringing. He attended parties with the wealthy where women were known to "rub champagne into his hair." He acquired a certain amount of polish and sophistication. Most of all, during his time with Cody, Jay Gatsby left Jimmy Gatz behind: "[T]he vague contour of Jay Gatsby had filled out to the substantiality of a man."
Dan Cody was a very important part in Gatsby's life because he taught him how to be a gentleman. Cody led Gatsby in the way of sailing and also taught him the proper way of acting. Cody saw potential in Gatsby and transformed him into the man Gatsby always dreamed of being.