While clones and most other sorts of sci-fi duplicates are identical to the original character and, by definition, the same sex, exceptions do exist. The idea dates at least from Nine Lives by Ursula K. Le Guin (1969), where recognized geniuses are routinely cloned in large mixed-sex groups and Time Enough for Love by Robert Heinlein (1973), where the opposite sex clones become sexual partners of the original. Nowadays the trope is more used as a quick way of producing a Distaff Counterpart rather than for titillation. Merely being of the opposite sex of his or her original greatly increases the chance of the clone surviving the denouement and showing up in a future story. This way writers can invoke the First Law of Gender Bending without sacrificing an original-sex character they've grown fond of.
Biologically, this is somewhat plausible for male-to-female cloning, because a male has an X-chromosome that can be doubled to produce a female clone, as in Garrett's poem and Heinlein's novel. (Two X-chromosomes are not even strictly necessary! ...Unless you don't want the clone to have Turner syndrome.) (Or alternatively, the SRY gene, which causes maleness, can be removed from the Y chromosome.) For female-to-male cloning, the Y chromosome would have to come from another subject, preferably a paternal relative and most ideally the father, as if the original subject were a male, she would have had a Y chromosome virtually identical to her father's. Nevertheless, this would technically not be a pure clone. A Y chromosome could be formed from one of the X-chromosomes, which would require absurd amounts of genetic engineering and amount to simple fiat anyway. (Alternatively, the SRY gene can be implanted in one of the X chromosomes to create a sterile clone that appears male.)
If the Opposite-Sex Clone retains the memories and personality of the original this is effectively a Gender Bender, at least from the perspective of the clone.
See Cloning Blues. Compare Distaff Counterpart, Half-Identical Twins and Screw Yourself.
After accidentally looking into an enchanted mirror, Ranma creates a copy of his female self. She, of course is infatuated with him. In the end he accidentally copies his male self and the two copies fall for each other. In an anime episode, Happosai attempts to split Ranma into male and female forms for his own selfish reasons. However, he misses the fact that, A: Ranma despises him and would never obey him no matter the form, and B: the incense he uses is called Personality Splitter. The result is an Enemy Without situation, as the Clone is a vampiric ghost-like entity that is the living embodiment of Ranma's evil.
Oddly averted by the civilization in Saber Marionette J, which consists entirely of men who reproduce via genetic manipulation and artificial wombs. One might expect them to have technology and know-how to remove the Y chromosome from an embryo and replace it with an X chromosome, but it doesn't work.
The female Nemu is the clone of the male Mayuri Kurotsuchi in Bleach.
In the Starship Girl Yamamoto Yohko TV series, Yohko's male clone, Yousuke appears. He turns out to be female and in disguise, but then actually becomes male later.
In the hentaimangaAlice's Adventures in Sexland, obviously an erotic retelling of Lewis Carroll's book, there was a furniture maker whose furniture was special because it would spring to life and play with the user. Her "masterpiece" was a mirror, which sprung a magical clone of Alice, because, as the creator says, Who knows best what you like and what you need, if not yourself. Only it wasn't an exact clone. She does state, however, that the mirror would have given a perfect clone if that was what Alice had wanted.
The former trope picture is from the artist Pisipisi, and is of a series of drawings where a perverted Mad Scientist college student clones the girl he's stalking — but puts his own mind in the clone instead of her's. Of course, then "she" wakes up, realizes that "she" now has a horny pervert expecting "her" to be a personal sex toy for him and his friends, and is less than enthused about the idea. Then she discovers that his male mind has no defense against female erogenous zones... Unfortunately, Pisipisi banned all American visitors to his website years ago due to harassment, and (possibly due to rumors of "Pisipisi" being the pen name of professional artist Saiwase Okiba) frequently goes months or years without updates.
Keith Violet of Project ARMS, the one female amongst the many clones of Keith.
Yu-Gi-Oh!, it isn't a clone exactly, but the digital copy of Mokuba Kaiba that Seto creates in a video game is Princess Adina. It makes a bit more sense in the Japanese version, where the Big 5 programmed the female Mokuba rather than Seto.
The Innovators in Gundam 00. They are all technically genderless but come in pairs; out of the four pairs only one has both members having adopted a persona of the same gender (both male), so each of the other six Innovators has their own opposite sex clone of sorts.
One of Naruto's techniques involves either transforming into, and occasionally summoning several more, scantily clad female versions of himself. And by "scantily clad", we mean "clothed in convenient smoke".
Darker Than Black Gemini of the Meteor reveals that Suou is an opposite sex clone that Shion created of himself to pass as his twin sister complete with Fake Memories. The real Suou died during an unrelated assassination attempt.
After Fantomex of the Uncanny X-force died, he was going to get a cloned body to come back with. However he has three different brains and each brain received its own cloned body. The nicest brain got a female body called Cluster.
Spider-Woman, in Ultimate Spider-Man. Ultimate Spider-Woman is a clone of Peter Parker, with all of his memories and personality traits. (They were going to blank her memory and give her an entirely new made-up personality and set of memories, but didn't get around to it before wackiness ensued.)
X-23 is an Opposite Sex Clone of Wolverine, developed by Dr. Sarah Kinney as a solution to not being able to recreate a Y chromosome from a sample of Wolverine's DNA. She instead buffed up and doubled the X chromosome, essentially making her a parthenogenetic offspring of Logan's mother (and thus, genetically his sister). She would also receive different mitochondrial DNA since she was carried to term by Dr. Kinney. Additionally, some sources suggest Kinney used her own genetic material to repair damage to the X chromosome, which is a reason why X-23 has the same green eyes as Kinney, as well as her being a cute goth chick despite being a clone of the famously unattractive Logan.
A Bleach Fanfiction has the Sonoma (the original universe introduced in Tite Kubo's work) and Kan'na, an alternate dimension, where alternate dimension versions of the Sonoma inhabitants exist. In some cases, they will be reversed gendered versions of the original. In the case of Dyan Arashi from Sonoma, he has a female counterpart in Kan'na under the same name.
My Little Pony: Friendship Is Magic has On a Cross and Arrow, where the mane 6 travel to another universe and meet their gender counterparts; Dusk Shine for Twilight, Bubble Berry for Pinkie Pie, Elusive for Rarity, Butterscotch for Fluttershy, Rainbow Blitz for Rainbow Dash and the name is the same for Applejack.
Naruto fanfictions happen to do this alot to the main character, due to his Opposite Sex-Clone actually being REAL. This is strengthened in the fact that it's not really a clone, but a disguise that quite literally changes Naruto into a Girl.
In Neil Gaiman's Interworld, Joseph Harker, after accidentally traveling between dimensions for the first time, realizes that he has been replaced in this dimension by Josephine Harker, an almost-exact female copy of himself.
The character of Lazarus Long in Robert A. Heinlein's book Time Enough for Love is the world's oldest living human. At the beginning of the book, he is trying to kill himself by avoiding "rejuvenation therapy", and a squad of his descendants rescue him. He makes a deal with them: he will go through rejuvenation therapy if they can unearth one experience he could do that he hadn't done already. Two of his female descendants arrange for Opposite Sex Clones of him to be implanted in them; both are born, and he finds himself raising twin female versions of himself.
In Tad Williams' Otherland series, one of Corrupt Corporate Executive Felix Jongleur's early attempts to make himself immortal involved cloning. The idea was to have a clone of himself implanted in a surrogate mother. Of course, the clone would only be a genetic copy; the child would need a similar upbringing to his own to produce an effective copy. To this end, Jongleur wanted the surrogate mother to be like his own mother. Unfortunately, he couldn't bring himself to unearth her body... so instead, he made an Opposite-Sex Clone of himself. That's right: he intended to impregnate an opposite sex version of himself... with himself. Very Squick. Fortunately, the project never went beyond the initial stages because a far more appealing (yet no less unethical) option presented itself, so Jongleur adopted the Opposite-Sex Clone for his daughter.
Not quite the same, but it's stated in various novels in Lois McMaster Bujold's Vorkosigan Saga that opposite-sex clones are possible, and that the corrupt rich people who choose to have their brains transferred into a younger clone sometimes pick this option (with optional plastic surgery beforehand, to make sure it's a pretty clone).
It's implied in Mirror Dance that some people order clones of themselves chiefly for the purposes of sexual experimentation, although the opposite-sex option isn't brought up at that point. It's also stated outright that he mass produced Durona Group are of both sexes, although there seem to be more females than males. (The original is a woman.)
In A Civil Campaign, Lady Donna Vorrutyer becomes Lord Dono thanks to a cloned set of male anatomy. The missing Y chromosome was supplied by her dead brother. Ivan gets really squicked by all this because he had previously had an affair with Lady Donna.
In the Battletech and Mechwarrior series of books The Clans are a race of supermen and women that are mass-produced in batches from the DNA of their greatest warriors. During their childhood all the clones engage in casual sex with each other to build bonds. This sometimes continues into adulthood; notable examples include the Pryde siblings from the novel Legend of the Jade Phoenix and the Hazen siblings from the Mechwarrior: The Dark Age novels; both from Clan Jade Falcon.
Maeve Wolf, of the Wolf's Dragoons, is secretly a sex-swapped clone of Jaime Wolf.
The Stardoc series has for a main character Cherijo Grey Veil, who is introduced as the daughter of renowned geneticist Dr. Joseph Grey Veil. Later in the series, we discover not only is she a female clone of the good doctor, she was created as a wife for him. Basically, he was such an egomaniac that he felt only his Distaff Counterpart would be a worthy mate. And he was willing to get laws passed declaring her a non-person in order to make sure she had no say in the matter.
A later novel revealed that her "father" did not intentionally clone himself as a female. This was done by an ascended being and was a complete surprise to the scientist.
In House of Suns, by Alastair Reynolds, the various posthuman clone houses, such as Gentian Line, consist of male and female clones of a single individual.
In James Patrick Kelly's story "Solstice," one of the main characters does this. Later he turns it into Screw Yourself. At least he eventually has a moral epiphany and is filled with guilt, both about the incest and his selfishness in cloning himself.
Averted in Maggody And The Moonbeams, where Dahlia (not the sharpest tool in the shed) only thought her son and daughter were "identical twins" (= natural clones) because she didn't know what the term meant.
In Biting the Sun the heroine goes male, just so s/he can produce sperm which s/he store, then uses (once she switches back to female) to impregnate herself. It doesn't end up that well...
In Sergey Lukyanenko's Dances on the Snow, a genius geneticist named Edward Garlitski manages to create a female clone of himself named Ada Snezhinskaya. She shares his ambition and a vision of a world where genetic engineering is the norm. However, they have different ideas on how to achieve this goal. He chooses to work within the system by perfecting genetic engineering (in another book he is hailed as the father of genetic engineering). She decides that the entire society needs to be remade through political means. She creates hundreds of clones of herself and Edward and sends them out throughout The Empire to be adopted by unsuspecting parents. She then plots a rebellion, which would result in her ruling with her clones. Her plan fails but Garlitski's succeeds.
In "A Clone at Last", a short story by Bill Pronzini and Barry N. Malzberg, a man commissions a female clone of himself because he has no luck with women.
Possibly the oldest example in modern SF is Nine Lives by Ursula K. Le Guin, published in 1969. Earth is in a sorry state, most people suffer from inborn defects. To remedy the situation, the best people are cloned. Usually the donors are male, since it allows to easily clone both sexes, and mixed-sex groups of clones are proven to function better.note Women are sterile, which means even the second X chromosome wasn't added. No other symptoms of Turner syndrome are mentioned. Or maybe they are present, but don't stand out against the background of other sick people. The story explores the reaction of normal humans who have to work with a "ten-clone" created from a genius who died young. And then how the sole survivor reacts to the death of his 9 siblings. Among other things it's mentioned that clones routinely share sleeping bags and sex seems just as natural for them as breathing.
Dune: In God Emperor of Dune, Leto is introduced to Hwi Noree, the new Ixian Ambassador, who turns out to be an Opposite-Sex Clone of the previous ambassador, genetically tweaked to be irresistible to the inhuman Leto.
One episode had Rimmer try to go the pervy route with this when he wound up stranded on an unoccupied planet. He screwed up the cloning, though... several times. Even when he got it "right", the clone still had his (male) face, but by that time he was a prisoner of his own male clones and thus had bigger problems...
Technically, she would be my sister, and therefore unable to take me as her lover. After much soul searching, I reluctantly decided, "What the hell", I just wouldn't tell her.
In Doctor Who, in the episode "The Doctor's Daughter", a female Truly Single Parent-offspring is made of the Doctor. She's a genetic duplicate made of a tissue sample, entirely against his will. The relationship between them is presented as father/daughter throughout, as she was created from splitting his chromosomes then randomly recombing them — like sexual reproduction but him being both parents. The Doctor calls her a "generated anomaly". Donna shortens that to "Jenny".
The actress that played her was actually the daughter of a previous actor playing the Doctor, so the different appearance may be justified.
In another episode Quinn is on a talk show and mentions meeting Logan, and of course the host immediately asks if he slept with her. They did kiss, though for his part Quinn was unaware of the connection at the time.
It's interesting that Logan found out that Quinn is her double via a "thermal scan", basically, an advanced biometric system that maps each person's unique "heat signature". The Fridge Logic comes from a man and a woman having the same heat signature, even if they do share the same parents.
Orphan Black focuses on several clone characters played by Tatiana Maslany. One of them, introduced in Episode 8 of Season 2, is a transman named Tony (formerly Antoinette).
The Clone Song: words by Isaac Asimov, sung to the tune of Home on the Range:
BattleTech General Maeve Wolf of Wolf's Dragoons is a female clone of founder Jaime Wolf. Rumors had it she was his illegitimate daughter even though public records claimed her as one of the war orphans the company took in while their own records had her as one of their Trueborn warrior of such mixed heritage that she refused a proper Bloodname.
In Mass Effect 2, Miranda Lawson is genetically engineered using her biological "father's" modified genome to be perfect. Unsurprisingly she has some pretty severe daddy issues resulting from what she perceives as her father's egotistical arrogance. Ultimately by the end of 2 and in 3, they turn out to be two VERY different people, with Henry Lawson turning out to be even worse than Miranda described and Miranda showing herself to be a Jerk with a Heart of Gold, with the Jerk part eventually being shed.
In the Street Fighter series, Cammy is a female clone of M. Bison (Vega in Japan, or simply "Dictator" in international discussions).
Kazuma Ardygun gets the short end of both the romantic stick (stuck in an crossover with a lot of Ho Yay Mecha Animes) as his only valid options is his underage sister and his data clone Aria Advance. Fans are optimistic, though, about his possible options in future games (namely Ibis and Sleigh).
The King of Fighters series has Kula Diamond, one of the many clones of Kyo Kusanagi. In addition to the sex flip, Kyo's powers over fire became Kula's powers over ice.
The series can be inconsistent about "clones", sometimes using the term to describe unrelated people who have just been altered to be like someone else, and not clones in the normal sense. This makes Kula's status as a clone unclear.
Kula did say in her storyline in KOF 2001 that she was "grown from a petri dish" (at least in the English version, anyway), which would make her fall squarely into this trope.
However, Kula's bio in Maximum Impact 2 hints that she's a clone in the "genetic manipulation" sense (i.e. a normal girl surgically implanted with Kusanagi DNA, much like K' and Nameless). While the MI series is an Alternate Contuinity, most of the characters' backstories seem to be unchanged, so...
Caulder/Stolos from Advance Wars: Days of Ruin has his 'daughters', Opposite Sex Clones of himself. They don't look that much like each other, so he appears to have fussed about with their genetics a little (which could explain their different eye colors). He does have a male clone as well, Cyrus, but he plays little part in the story.
In The Sims 2, a cheat can be used to impregnate a Sim by him/herself. Doing this will produce offspring that is a clone of the parent, but it will always be of the opposite sex. Notably, the child Brandi Broke is pregnant with when first played is such a clone, and isn't genetically related to his supposed father at all.
In Xenosaga URTV #668, named Citrine is the opposite sex clone of Dimitri Yuriev, as were all of the female variant URTVs.
By the time of Mega Man Zero, the four Guardians were created from Mega Man X's DNA. One of these Guardians is Fairy Leviathan, obviously female.
Endless Space has the Horatio faction, an array of clones of ultra-rich Horatio the First. Some of them are female, because Horatio got bored with just his male clones.
Mordred from Fate/stay night is technically one, since she was a homunculus created using Saber's DNA when she was under a Gender Bender spell. However, Mordred was long thought by fans to be a male clone of the female Saber until Nasu stated otherwise.
El Goonish Shive had protagonist Elliot using an ancient magical artifact to try to undo a Magitek gender bender, inadvertently creating Ellen in the process. She was "born" with a perfect copy of Elliot's memories and personality (though she says the memories feel more like stuff she learned, rather than experiences), but her initial Cloning Blues and subsequent attempts to establish her own identity led to Divergent Character Evolution, so she isn't a simple Distaff Counterpart. More than a few scenes make it clear that the classic sex partner idea seriously squicks both of them. In fact, they keep up a convincing masquerade of either cousins or long-lost siblings, depending on who you ask. Furthermore, since Ellen was split off by the Dewitchery Diamond, Elliot can be considered Ellen's father and (since this is El Goonish Shive and a Gender Bender was inevitably involved) her mother as well. Unfortunately, all of this (plus Elliot's Chronic Hero Syndrome and Ellen's initial Cloning Blues) causes him to treat her like a little sister, which tends to annoy her no end.
The community-driven interactive fiction MS Paint Adventures: Problem Sleuth introduces a trio of detectives: Problem Sleuth, Ace Dick, and Pickle Inspector ("pickle" in this context is meant to connote "problem"), who, through spirit quests, are psychically linked with female counterparts of themselves, whom they eventually meet in person and are instantly attracted to. Problem Sleuth gets Hysterical Dame, Pickle Inspector gets Nervous Broad, and Ace Dick, lacking the imagination to think of a female counterpart, simply becomes linked to another male version of himself (albeit one who owns a blonde wig).
In Dragon Tails, when Norman the squirrel orders a clone of himself, he marked the sex box with an F (for "Fine the way it is") and got a female clone. The clone is also a child, since this was done with genetics.
They were also really drunk while designing her genetic pattern, so they made her glow-in-the-dark as well.
The Inexplicable Adventures of Bob!: While trying to manipulate Galatea, Riboflavin shapeshifts into his idea of what a male of her species would look like. Unfortunately, she doesn't actually have a species, and her reaction is, "Oh my G...! A sex-swapped version of my own face? I'll have nightmares for a week!" He then disguises himself as a handsome human male, and gets a much more favorable reaction from her.
Not an example, but in Dumbing of Age, Sarah refers to Joyce's nearly-identical older brother Joshua as this.
Mixed with Evil Counterpart in AH.com: The Series: the crew's Mirror Universe doubles (who previously appeared having the same sexes as the primary crew) inadvertently invent a Gender Bender virus and then have to kidnap the primary crew to extract original DNA samples. By the end of the episode in question, they're all cured except Doctor What, who ends up remaining female in subsequent episodes. Given that the counterpart is likely just as big a perv as the original, s/he probably adapted quickly enough. Includes examples of Man, I Feel Like a Woman and lots of Squick.
In The Guild Bladezz' little sister looks even more like him than you'd expect (the androgynous clothes probably help). This isn't to put her down, if anything it makes Bladezz retro-actively prettier.
As a corollary to Rule 34, Rule 63 (it would have been Rule 36, but it's reversed, get it?) says for every male character, someone has made a female version of that character, and vice versa.
Quoth many an anonymous users: "It's not sex; it's masturbation!"
A variant from the Whateley Universe: In "The Second Book of Jobe", kleptomaniac devisor Belphegor ends up downloading a copy of his own personality into a cloned female drow body based on Jobe's "drow formula" and DNA. Hilarity quite naturally ensues, though the overall awkwardness of the situation (and not just because campus security shows up right the next moment) isn't neglected — for one, both Belphegor and Jobe find themselves promptly declared "Belphoebe"'s parents of record, and there's every reason to believe that she's here to stay because there's in-universe evidence that she's managed to dodge the Clone Degeneration bullet...
Bionic Six: Dr. Scarab's attempt to create a female companion resulted in this. Later, his female clone created opposite sex clones of his henchmen.
In a Valentines episode of House of Mouse, Ludwig Von Drake deduces that the perfect partner for someone would be an Opposite-Sex Clone. The two can't stand each other, and she breaks up with himself.
Dr. Finklestein from The Nightmare Before Christmas builds a female version of himself out of body parts around his lab. While not a genetic clone, he does give her a half of his brain, so that counts.
Dr. Finklestein: We'll have conversations WORTH having.
The Powerpuff Girls: The Rowdyruff Boys, in a twisted-Evil Counterpart way. They aren't so much clones as bargain-basement knockoffs, made when Mojo Jojo imitated the Powerpuffs' creation using more "manly" ingredients. Some fans consider them romantic counterparts to the girls as well. They're not, 'cause they're dead.