I absolutely love Drag Queen Astronaught by Sarah McDonald. Incredibly poignant exploration of gender expression. McDonald also has a self-published book dealing with gender called Diana Comet and Other Improbable Stories (which I haven't read).
Capriox Bovidae writes a serial about a female warrior ritually transitioned and culturally acknowledged as a man called Strong Heart.
Dicebox is an amazing webcomic set in a futuristic world where there exists a veritable gender cornucopia.
Kagerou has a character named Heyoka who appears to be a male-to-female transgendered person (the author, Luka, is also a MtF transgendered person).
For an incredible mainstream published sci-fi trilogy dealing with a three-sexed species and five-way matings, there's Octavia E. Butler's Xenogenesis trilogy. Her stuff in general tends to explore the binary gender paradigm.
The manga Saiyuki, a parody of the Asian legend "Journey to the West" depicts the Bodhisattva of Mercy as intersexed/hermaphroditic.
Zerophilia is a fun movie about a minority of humans who upon being sexually initiated change sexes every time they orgasm (believe it or not, it's not porn).
Lynn Flewelling wrote a mainstream published trilogy where the main character is magically sex-changed at birth to protect her from assassins.
I feel like I'm missing quite a few, but these are the ones that come to me off the top of my head. I'll keep digging.
In my current project, Guts and Sass, gender and gender ambiguity play more of a background role, and most of the gender elements have not yet become obvious, though they become more prominent as the story progresses. One of the main characters, Alan, is from a semi-domesticated herding culture where he experienced the first rite of passage for being male, but not the second for being a herder (the equivalent of the "man" gender in their culture) because of his role as a healer. Therefore he occupied something of a third-gender status, but upon being kidnapped by the local binary-gender agriculturalists was firmly shoved in the "man" category. Another main character, a young woman named Ridiath, has developed a rather ambiguous gender role in her culture that doesn't raise an eyebrow among the people she lives with, but endangers her life when interacting with other cultures. There's also a supporting character, Beond, who is biologically female and has always identified with and lived a man's gender role.