What we have learned, by the end of the story, is that "Jay Gatsby" was really "James Gatz" and was born into a poor family in North Dakota. It's during his time in the military that he meets Daisy and falls in love with her, but being from a different "rung" of society the romance doesn't survive and Daisy marries the wealthy Tom.
In order to woo her back, James Gatz becomes Jay Gatsby and tries to become the sort of man that Daisy wants. He learns the ropes of being wealthy from Dan Cody while yachting around with him. This helps him to absorb (an albeit flawed) version of the lifestyle.
Gatsby then puts his talents into illegal "bootlegging" operations by connecting with various shady characters (such as Wolfsheim.) This illicit trade in alcohol gives Gatsby the wealth he needs to buy a big mansion and hold parties with an eye toward attracting Daisy back to him. He lives a luxurious lifestyle in the way a peacock will flaunt its feathers.
In the end it works temporarily as Daisy is reminded of her love for Gatsby and mesmerized by his wealth and good looks. In the end, though, Gatsby is "new money" and his background is flawed because of it...Daisy remains with Tom and allows Gatsby to take the fall for her hit and run accident. In the end, she doesn't even go to his funeral.