The answer to your question depends on what chapter you are referring to because Gatsby told Nick a lie at first when they talked in chapter 4. At that early point in their friendship, Jay told Nick that he was the son of some wealthy people from the midwest who had all died. Later, Gatbsy began telling more and more of the truth to Nick. Even as late as chapter5, when Nick invited Jay and Daisy to tea, Jay is still maintaining some of his fictional background. He let it slip out that it only took him three years to earn the money to buy his mansion. When Nick said he thought that Jay had inherited his money, Jay quickly tried to cover by saying that he'd inherited but then lost all his money in the panic of the war. Even though the reader learns about Jay Gatsby's real name and about Dan Cody in chapter 6, it is in chapter 8 that Nick tells the reader he finally learned the true story of Jay Gatsby's beginnings. This is when Jay reveals that his real name was James Gatz, the son of poor farmers who left home at an early age and was taken under the wing of a newly rich Dan Cody. Cody taught Jay how to live the good life and how to mingle among rich people, even though that education was all the Jay ever actually received from Cody's estate. Jay reveals his past very slowly to Nick throughout the story, layer by layer.