Cody was a yachtsman who he worked alongside. The young Gatsby was, at that stage in his life, aimless when he met Cody. The priceless education that Cody left for Jay on how to live was what he did for Gatsby. Cody's picture is onthe wall in Gatsby's mansion.
What Cody actually did for Gatsby was give him a reason "why" to work toward something. He was more like a fatherly influence.
We first hear of Dan Cody on the enchanted--and rainy--afternoon that Daisy and Gatsby first reunite after five years. Gatsby is showing Daisy the house with Nick in tow. Nick stops in front of a large photograph of an old man in a "yachting costume." The picture hangs over Gatsby's desk and "attracted" Nick. Nick asks who it is. Gatsby tells him it's Dan Cody and then says:
He's dead now. He used to be my best friend years ago.
Given how mysterious and misrepresented Gatsby's past has so far been, this photo and Gatsby's statement that Dan was his "best friend" offer important and concrete glimpses into his real past. But they remain glimpses for now. For when Daisy sees a small photo of Gatsby, taken when was about 18, she exclaims
I adore it ... You never told me you had a pompadour--or a yacht
Gatsby hurries her past it without any explanation, diverting her with newspaper clippings he has gathered, about her, Daisy.
We find out later why Gatsby rushed Daisy past the photo. The yacht was never Gatsby's but Dan Cody's. We learn that Gatsby, then named James Gatz and the son of poor parents, sees the yacht on Lake Michigan while "loafing on the beach in a torn green jersey and a pair of canvas pants."
The yacht drifting on the water ignites and focalizes Gatz's desire. He wants what it represents and by the time he is rowing out to it, he had become "Jay Gatsby," a reinvented person on his way up.
James Gatz/Gatsby had recently left St. Olaf's, a small Lutheran college that had shamed him by forcing him to work as a janitor to earn his tuition. When he arrived at the yacht, he met Cody, 50 and a self-made millionaire. We are told that the yacht "represented all the beauty and glamour in the world" to Gatz/Gatsby. Noting that Gatsby is "quick and extravagantly ambitious," Cody takes him under his wing, buying him new clothes and bringing him with him to the West Indies as an assistant "in a vague personal capacity." Cody grows to trust Gatsby more and more over the next five years, until Cody dies. He leaves Gatsby $25,000, which Gatsby is cheated out of, but that doesn't seem to matter: the real legacy Cody has given Gatsby is a "singularly appropriate education"--in what we can guess is making money in shady ways--and the legacy of having helped his young friend mature from a teenage boy into a man.
Nick leads us to suspect that although Gatsby might name Cody as his "best friend," the education and maturity Cody offered Gatsby veered to the dark side. Nick describes Cody as a man "with a hard empty face," calling him a "pioneer debauchee" and one who brought "savage violence." Nick suspects that it is Cody's abuse of alcohol that keeps Gatsby from drinking.
The story suggests that Cody offered Gatsby a hard schooling in life, with hints that Cody was attracted to Gatsby sexually: Gatsby, young and handsome, becomes the "debauchee" Cody's intimate assistant in "a vague personal capacity," is dressed by him, left money by him and trusted by him. But whatever the nature of their relationship, Cody was Gatsby's ticket out of a poor and dead-end life. Cody gave Gatsby his start, and it is poignant and telling that the secretive Gatsby keeps a large photo of him hanging over his desk.