The whole virginity thing is mostly a red herring.
The Talmud actually says a woman is supposed to wait a few months between marriages, so we won't have these paternity confusions!
The whole marriage could be considered "an act under severely faulty premises" and therefore null and void (theoretically, no divorce ceremony is needed but we'd strive to obtain one anyhow for appearance's sake) from the get-go if one side had some condition that any reasonable Jewish person would consider a deal-breaker. (E.g. s/he presented themselves as Jewish-born and Jewish-identifying, but actually had secretly gone off and gotten baptized and has been going to church for the last six months.) As we'd said about about the waiting a few months, plenty of men seem to have been okay marrying a woman who was openly carrying an ex-husband's child, but fooling someone about carrying another man's child could likely be called a dealbreaker.
As for "grounds for divorce" -- look, if a couple comes to the rabbi and says that everything is going fine, but they want a divorce because they're bored and they feel like it, the rabbi should advise them to reconsider, but at the end of the day there's nothing stopping them from going through a divorce ceremony. (Usually it would be their local pastoral rabbi doing the counseling; divorces are handled by specialist rabbis whose job is generally to just process what they're given.) The financial settlement, however, comes into play. In Talmudic times the rule of thumb was that he always gave her a lump sum of one year's support (the ketubah) unless it was considered "her fault"; and the cases in the Talmud's book of Ketubot make it fairly clear that her hiding something big coming into the marriage could qualify.
Practically, a pastoral rabbi should first assess the relationship and all involved, the healthiest thing may be for them to try and work it out. But if they both want to call it off, the rabbis would certainly process their ritual divorce. After the ritual divorce, the couple is supposed to let a rabbinic panel handle the financial settlement, and I suspect it would quite strongly favor the husband in such a case. (If the couple would rather give all their money to the lawyers and spend years being dragged through mud and go to the courts instead, they're not supposed to do so but the divorce rabbis can't/won't stop them.) If the husband demands a divorce but she wants to stay, the rabbis would likely -- depending on the details of the circumstances -- make every effort to convince her to go through with the divorce ritual, and if that still fails, leave a divorce document in escrow for her.