American literature and history often share powerful and vibrant connections. The literature helps to dramatize and bring alive the historical reality that gives birth to it. For instance, Fitzgerald's work helps to operate almost as much as a historical text of life in the 1920s and its implications as it does a work of literary merit. Steinbeck's "The Grapes of Wrath" does much of the same for life in the Dust Bowl and the life of poverty in the 1930s. Arthur Miller's works, "Death of a Salesman" and "The Crucible" reveal some of the more frightening notions of life in the 1950s, as the desire to appropriate the American Dream and political power help to serve as the backdrop to these works. Hansberry's "A Raisin in the Sun" is a powerful study of the changing social and economic dynamics of the 1960's and 1970s for people of color and how the convergent demands of race, class, and gender all play a role in the definition of self. In these examples, literature and history end up complementing one another in a better understanding of what it means to be an "American."
While great American literature is timeless, there is, indeed, a connection between a work and its historical setting as well as the era in which the author has lived. After all, literature is the recording of human experience, and that experience derives from the historical incidents as well as the thinking of its era.
For one thing, the preoccupation with certain themes in a short story or novel is very reflective of the thinking and literary movement of the time in which the work is written. For instance, Hawthorne's works reflect his angst over the "sins of the father," his relatives who participated in the Salem Witchcraft trials and the religious hysteria of Puritanism. Herman Melville, a dark Romantic, broods extensively upon metaphysical ideas. Ernest Hemingway, a Modernist of the big wars era, searches for a solution to the guilt and alienation that man feels in his time. John Steinbeck, a contemporary of Hemingway, also agonizes over the alienation of men in the Depression Era.
Clearly, the historical events and influences of their country as well as the literary movement and thinking of their times are tied inextricably to the creative process of writing literature for American authors. Often, as in the example of F. Scott Fitzgerald's The Great Gatsby, a literary work is a tableau of its times.
I would say that the connection between The Great Gatsby and American history is that the book really illustrates the spirit of a certain time in American history.
Historians say that the 1920s were a time of people getting richer, having more consumer goods, and living lives that were easier and more focused on having fun than the lives of previous generations had been. I think that you can clearly see this reflected in this novel. Almost all of the people in this book are examples of people who are living only to have fun, not for any greater purpose or with any greater goals. Historians often say that this was a spiritually empty time in US history, and this novel helps make that point.
Of course, you can also argue that novels like this help persuade historians to see that time period in that way. If you see it like this, then the relationship between history and this novel is that the novel helps to shape our vision of what the '20s were like.