Ivan Kramskoy apparently never said who the woman in this painting was. The portrait created quite a stir in its day, as critics were appalled by her coquettish look. Later, many came to take this painting as Kramskoy's impression of Anna Karenina. After all, he had been commissioned by Pavel Tretyakov in 1873 to paint a portrait of Tolstoy for his gallery. Pavel had no luck himself getting the count to pose for a portrait, but Kramskoy managed to win Tolstoy over. It just so happened that Tolstoy was working on Anna Karenina at the time. However, Kramskoy painted the "unknown woman" several years later. Maybe he was inspired by Anna, maybe not.
Others have erroneously attributed the unknown woman to a poem by Alexandr Blok. If anyone was inspired here it was Blok, as the painting predates the poem by several years.