Through Anna Karenina, it's clear that Tolstoy despises hypocrisy, and that's precisely what one finds in Petersburg and Moscow's high society circles – especially in Petersburg, which is filled with flashy, hedonistic types like Princess Betsy Tverskoy. Society is a malevolent force in this novel: consider that Karenin's great moment of communion with God is ruined when he realizes that all these society types (again, like Princess Betsy) are laughing at him.
However, we have to distinguish here between society and class. Just because Tolstoy doesn't approve of society doesn't mean he wants an end to class divisions. Sure, he's suspicious of aristocrats living in cities away from their country homes. But he also supports the right of someone like Levin to be a landlord, with a son to inherit his property after Levin dies. Tolstoy is OK with hereditary aristocracy as long as the noblemen live on their estates and are concerned with farming as best they can, in cooperation with their peasants.
Ultimately, Anna's exclusion from society is not a decisive factor in her choice to commit suicide.
Tolstoy shows the lower class as having intrinsically better values by depicting all the servants in Anna Karenina as faithful friends of their employers.