Nick and Gatsby are considered part of the "Lost Generation" because of the timing of their lives in the context of history. the "Lost Generation" in general refers to persons who were of the age that was or could have been involved in the fighting during World War I. Gatsby was actively involved in the European front; Nick was not in the service but was of the same generation.
For many, the "Lost Generation" literally identifies those who lost their lives in the war. For survivors who came home carrying physical and/or mental wounds, the phrase indicated the enormously difficult attempt to reenter peacetime society in the United States.
For Nick and Gatsby, being part of the "Lost Generation" reflected an aimlessness in their personal lives and activities. The phrase apparently originated with Gertrude Stein and was further used by Ernest Hemingway, both utilizing it to describe individuals in their twenties or early thirties during the years immediately after the conclusion of World War I.