Thanks. In Chinese, the word is Xingbie, which does contain the character of "sex", but I think that, unlike English, the word itself doesn't have the connotations of sexual intercourse.
I still vividly remember a joke that my boss once shared with us: one of our clients was filling out an application form in Canada, and in the item "sex", he answered "once a week".
There is no discernible difference. The preference for "gender" seems to stem from a very strange reluctance on the part of some people to use or even see the word "sex" because it has connotations of "sexual intercourse". It doesn't quite fall under "political correctness" because the word is not considered offensive about a particular group of people. It simply seems to offend the (in my opinion rather puritanical) sensibilities of some people.
I always use the word "sex" rather than "gender".