Is gender a result of Kamma? Are the genders male/female a result of Kamma, or is it associated with it in any way?
Karma is a very complicated process. We could in fact say that just about everything affects just about everything else - if a butterfly beats its wings in China, it does probably play some infinitesimal role in causing hurricanes in Florida. If, by karma, you mean any old action whatsoever, then indeed, there are probably certain actions (especially mental ones) that lead one to be reborn as one gender or the other.

Specifically, a man's obsession with women would most likely cause him to be reborn as a woman, and vice versa. This is most likely what happened in the stories we have that have been traditionally interpreted as suggesting that adultery leads to being born a woman. It is far more likely, in my mind, that male adultery with women leads to being born a woman, and female adultery with men leads to being born a man. The cause being the insane obsession.

This, of course, is not what is meant by karma and result in a Buddhist sense. Here the fact that one was born a woman or a man was not a "bad" or "good" result, it was just a case of obsession leading to realization of the object of obsession.  If one were insanely obsessed with cats, one would likely be born a cat.

If, by karma, you are referring to ethical acts, in the sense that, for example, being born gender A is the good result of certain good deeds and being born gender B is the evil result of certain evil deeds, it seems unlikely that one could infer that from the Buddha's teaching - itthindriya and purisindriya are just two of the many aspects of physical being; there is nothing intrinsically inferior or superior between the two, I don't think.

That being said, genders are hardly ever equal, physically or socially, in any species of being; in India at the time of the Buddha and when the commentaries were written, for example, being born a human female would have been a bad thing given their inferior social status, and thus could be taken indirectly as a sign of bad past karma. Too, the physiology of a human female is arguably (though not conclusively so) a cause of greater potential suffering than of its male counterpart, forcing one to deal with menstrual cycles, pregnancy, etc., as well as generally inferior strength.  

Of course, this need not always be true; nor does it imply that the female faculty itself is inferior to the male faculty, or brought about by bad karma in all cases. Several species of mammal exhibit characteristics of female domination; the human species itself seems to be heading closer to a level of equality between the genders. Thus, it seems erroneous to suggest that one gender is an intrinsic result of good karma and another the intrinsic result of bad karma.

To be perfectly clear, in the abhidhamma, karma refers to one's mental volition or motivation, and the result is always expressed in terms of experience - good karma results in good experience, bad karma results in bad experience (viz. of seeing, hearing, smelling, tasting, feeling, and thinking). For gender to play any intrinsic role in bringing about the result of good or bad karma, it would have to intrinsically be the cause of specific pleasant or unpleasant experiences. Again, any such relationship seems more related to the evolution of certain species and cultures than the intrinsic nature of the genders.

Finally, the whole concept of karma is suspect; an arahant performs no karma, good or evil, and doesn't see any experience as either pleasant or unpleasant. In ultimate reality, whether certain experiences are "good" or "bad" seems largely subjective, and any volition or motivation that leads one to be reborn as either a male or a female of any species is definitely "bad" or "wrong" in an ultimate sense.