There are two kinds of religion in competition with one another in Anna Karenina. First, there's "real faith," represented by Karenin's forgiveness of Anna, Varenka's good works, Kitty's spirituality, and, eventually, Levin's own illumination at the end of the novel. And then there's piety for the sake of proving you're better than everyone else. For an example of this, turn to Madame Stahl (Varenka's guardian) and Countess Lydia. Tolstoy is open about his opinion that the form of the religion is less important than the faith behind it. Levin's even willing to acknowledge that, although he came to his epiphany through Christianity, people in other religions may have equally valid ideas about "living for good."
Tolstoy is suspicious of the value of "good works" performed to show piety or religious feeling to the world if there is no personal conviction or emotion motivating these acts of charity.
Even though Levin's religious transformation happens in a Christian context, he is open to the value of other systems of religious belief.