In America's Gilded Age (between 1876 and 1901, approximately), the rich got much richer, and the poor got much poorer. It was a time of great industrial expansion in the United States and a time when the stock market was doing very well. Great cities such as New York became worlds of extremes, where on one block lived millionaires in mansions and on another block lived immigrant families in tenements. It is in this environment that Edith Wharton chose to set her first major novel.
Wharton knew the upper-crust New York society well because her family was in it. She was familiar with the politics of that society and knew how cruel it could be. It was her intent to satirize this society, but also to show the profoundly tragic suffering that goes on inside it.
To be sure, The House of Mirth is a novel that condemns the elitist world of women like Bertha Dorset; it does so by promoting the age-old ideal that you can't buy happiness. The most content person in the novel may be Lawrence Selden, who is comfortable with his modest wealth and remains a detached observer of the upper-crust. Lily Bart, the protagonist, is trapped by her obsession with money, which prevents her from marrying the man she really loves because he is not wealthy enough.
Perhaps more importantly, Wharton wanted to write a "novel of manners" (see "The Novel of Manners" section) with a particularly American spin. She wanted to portray American aristocracy in a time when that aristocracy was doing so well. Moreover, she had a fascination with the small details that comprise a study of manners. The House of Mirth, consequently, is a novel that stresses each aspect of a person's social behavior, because each detail can have implications. When Lily is seen alone with George Dorset at a train station one night, others immediately assume that the two are having an affair, and Lily is punished with expulsion from society. In this world of manners, the past never dies, but instead can always come back to haunt people.
Finally, it is important to keep in mind that The House of Mirth was written at a time when the realist movement in literature was thriving, spurred on by the publication of the enormously influential realist novels of French writer Emile Zola. The type of realism seen in Wharton's writing is particularly influenced by Darwinism, best described as the survival-of-the-fittest concept. Applied to literature concerning human society, this means an interest in creating portrayals of society and human interaction governed by the principle that only some members of society are cut out for success, while others are doomed to failure and extinction.