Gender is a social construct. Sex is a biological contruct.
As is, in the vast majority of species you have a minimum of three sexes: male (sperm produders), female (egg producers), and a sex not readily identifiable as typically male or female (a combination of the two, whether on chromosomal (XX, XY, XXY, XYY, XO, etc.), gonadal (testes, ovaries, womb, etc), or external genetalia (vagina, penis).
Gender (identity) is a spectrum with at the two extremes thereof: masculine and feminine. For example, you could have feminine guys, masculine girls, or essentially any combination of biological sex and gender identity.
Now, having said that, what you are likely talking about is the biology; ergo, sex and sexual dimorphmism. There are dozens of unique approaches I can think of off the top of my head when it comes to procreation and raring offspring.
First, you have the posibilty of a 'slave sex'. Just like with the seahorse and some species of frog, that the egg producer either excretes the eggs (for or post fertilization), it isn't all that hard to believe there would be room in such a setup for a third sex to bring the eggs to term (i.e. guard them, offer nutrients). In fact, certain species of wasp use other species for this (burying the eggs in them so the hatchlings will have food after being born).
Another example? Well, we look again to nature: ants. Sterile females (in some subspecies with wings) versus fertile queens and worker/soldier ants (infertile males) versus drones (fertile males). There you have four biologically divergent sexes in one species, and how they help the species servive (even if the infertile ones cannot procreate).
Another way this can play out? Like with bees. In some subspecies (I'm tempted to say all, but I don't know for sure this is the case) females would suck/eat/drink a special substance (excretion) from the queen bee, keeping them infertile to not over populate the hive. This way, if anything happens to the queen, there is a host of females that can take over. It isn't as dramatic as the ant example, but it would work just the same.
Another, slightly off-topic, example is to show how the parents go about raising the offspring. Black swans help here. A percetage of them form homosexual couples and start a threesome with females just for the eggs. Once she lays, she's kicked out of the nest, and the happy couple go about their lives.
Then we get into 'gender differences' that could help with childrearing. For this we turn to Micronesian with Fa'afafine. The 'third gender'. They help take care of the home, help raise siblings, nieces/nephews, etc.
If you want a more religious reasoning (depends on your species) you can also go with the Hijra of India. They were believed to be holy, conserated to a god that demands the removal of male genetalia as an offering to her.
In the end, it's about what angle you want for these 'extra sexes/genders'.