We reproduce via meiosis (sexual reproduction) in which two sex cells with half the parent's chromosomes combine to form a full organism. Sexual reproduction is a very common form of reproduction and the most common form of reproduction for advanced organisms. Clearly it has evolutionary value.
But we wouldn't need genders for that to happen. We could all be a single gender, or have both genders, and it would work just fine. The fact that most species have developed different sexes would seem to suggest that it has some other purpose.
Different genders allows for diverse roles. In humans, the female carries the child and feeds it, which requires larger hips and larger breast tissue for milk production, etc., which also leads to a natural division where the women stay near the homestead raising and nurturing children, while the men go out to hunt and protect the home, and therefore need to be, and can be, larger and stronger. It also allows for the one gender to be somewhat expendable.
Similarly, there is no reason we need to have sex to reproduce. We could transfer sex cells by casual touches, for instance. So again, sex has a purpose beyond reproduction. Put simply it is fun and by creating such an interaction, we create a political system of pleasure seeking in which gratification establishes bonds and the desire for gratification encourages men to show-off and gives women something of value to barter with.
The point to be made is that these gender differences, gender roles, and the politics of pleasure, have utility beyond simple reproduction. They are related of course. They give us a method for trying to choose strong mates, but they go well beyond that, and give us a complex and dynamic social environment, that has tremendous value in itself.
People who use the natural procreation argument against same-sex marriage are doing so as if we were simple single cell amoeba. We aren't. Our complex and dynamic societies have purpose and include blurriness of genders as well as deep politics of desire which include all sorts of sexual couplings. This is true for all advanced animals and is completely natural.
The only thing unnatural is some weird black and white world where only men and women have sex for the sole purpose of baby-making. That doesn't exist in any advanced animal.