Even though gender seems more salient in some situations - for instance, when a woman enters a male-dominated profession - gender categories also become salient in contexts in which gender is less obvious.
West and Zimmerman give this definition for sex in their paper Doing Gender: "Sex is a determination made through the application of socially agreed upon biological criteria for classifying persons as females and males.