Sex is the biology; Gender is the identity. Discrimations are based on gender, not sex. Women are told to wear pink dresses because of how our society see women (female gender), not because they have a vagina (female sex).
That's only a very recent distinction, and still a contentious one. According to Merriam-Webster (http://www.merriam-webster.com/dictionary/gender) and the OED (http://www.oxforddictionaries.com/us/definition/english/gend...), it's far from clear.
Really? I'm pretty sure a large part of any discrimination against women is due to their physical sex, not the way they identify.
What evidence do you have that identity doesn't originate in biology?
I'm well-aware of the existence of transpeople, but I'm not ready to conclude that gender dysphoria doesn't originate in biology. There's more to a person's biology than their genitalia.