The short answer is that nobody knows hos SRS affects marriage, outside of a handful of states. (this is US-specific)
I don't know of any state that uses anything other than physical characteristics (either chromosomes, gonads, or genitals) for determining male and female for purposes of marriage. DMVs and such use other characteristics for ID cards and driver's licenses, but DMVs don't marry people. So who you really are, if it differs from your chromosomes, gonads, and genitals, does not matter one bit for marriage.
I don't know of any state that has invalidated a marriage that was entered into in a valid way, where at the time of marriage the parties had different chromosomes (XX for one, XY for the other) from each other, different sexual organs, and different letters on their birth certificates. But it could happen, particularly with DOMA - a state could refuse to recognize marriage between two men or two women. And the feds cannot recognize marriage between two same sex people due to DOMA. My reading of DOMA would imply that if the feds see both parties as men or both parties as women, the marriage isn't recognized by the feds. So either you need the feds to not recognize your gender or you need the feds to get rid of DOMA if you and your spouse are the same gender. I don't think DOMA makes an exception for "it was a valid marriage before you recognized my gender".
The key part of DOMA for the feds is "In determining the meaning of any Act of Congress, or of any ruling, regulation, or interpretation of the various administrative bureaus and agencies of the United States, the word 'marriage' means only a legal union between one man and one woman as husband and wife, and the word 'spouse' refers only to a person of the opposite sex who is a husband or a wife." If the feds recognize you both as man or both as woman, then I can't see how they could provide any benefits or responsibilities of marriage, regardless of your sex or gender at time of marriage.
The confusing part is that there is no definition of male or female, man or woman, in statute. Some agencies at federal and state governments have policies and administrative law/regulations, but these are not binding on other agencies. In otherwords, the State department of Family Services wouldn't have to recognize the State DMV's designation on a driver's license or the State Health Department's notation on a birth certificate or the Fed's notation on a passport. They can (and often do) have different rules (or, as is also often the case, no rules at all, so they wing it on each case).
The other open question is "What definition of man and woman is important to the feds?" If I was married in a state that recognizes SRS for purposes of marriage (most states neither recognize or not recognize it - it's simply unknown in most states what the law is, until there is a court challenge), but live in a state that doesn't recognize SRS for purposes of marriage, am I federally married? There is no federal definition yet, but there are two contradictory state ones in this case - what wins? Neither? Marriage state? Residence state? It's important because of DOMA.
Complicating it is the fact that the documents don't make anything legal. Having a birth certificate, driver's license, passport, or social security card with certain gender identifiers does NOT change your sex or gender legally. It is evidence of your sex or gender, but at the end of the day, it's whatever a court thinks is important to sex or gender (typically chromosomes, sex organs, or what was initially indicated on your birth certificate - and if whatever criteria the court uses disagrees with your documents, your documents lose).
It's a royal mess and incredibly bad law right now. Too many people assumed sex and gender were always trivial to determine, always obvious, and that everyone would always agree about someone's sex/gender (they use the words interchangeably - they don't even always recognize the difference between sex and gender!). There are only two types of marriages which would be recognized by all states and the feds:
- Marriage between two opposite sex people who have BOTH have had NO SRS and who's original birth certificates have opposite gender identifiers. There must be one penis and one vagina.
- Marriage between two opposite sex people who have BOTH have had "FULL" SRS (different states recognize different surgeries, unfortunately) and who's original birth certificates AND current birth certificates both have gender identifiers that would make the marriage heterosexual, no matter what standard is used by a court. There must be one penis and one vagina, both now and in the past.
If someone has had SRS, and cares about this stupid, unconstitutional, discriminatory law, or you don't want the possible effects of entering illegally claiming marriage benefits/responsibilities, you need to either not marry or marry someone who also has transitioned (and is opposite sex).
I personally see my own marriage as a form of civil disobedience. It's a heterosexual marriage, but we are in legal limbo as there is no definitive case law as to whether or not our marriage is valid - not in our birth states, not in our marriage state, and not in our state of residence. Nor is the case law federally. I think we're in the right, and we'd win a legal case, but I could be wrong. But I do feel I had a responsibility to marry the person I loved, regardless of any legal ambiguities. I'd rather profess my love and enter into marriage with my wife than not, even if there may someday be legal consequences.
That's why we need to support same-sex marriage, even if we are heterosexual. Otherwise we will challenge the courts to define male and female, and there is no definition that would include everyone in the proper place.