Globally, the majority of people living with HIV are women or girls, but they have been a minority of participants in clinical trials and observational studies of HIV. Despite this underrepresentation, differences in the pathogenesis of HIV have been observed between men and women, with contributions from both gender- and sex-based factors. These include differences in the risk of HIV acquisition, in viral load set point and immune activation in responses to viremia, and differences in HIV reservoir maintenance. These differences obligate adequate study in both males and females in order to optimize treatments, but also provide a powerful leverage point for delineating the mechanisms of HIV pathogenesis. The shifts in exposure to sex steroid hormones across a lifespan introduce additional complexity, which again can be used to focus on either genetic or hormonal influences as the driver of an outcome. In this Review, we discuss consistent and reproducible differences by sex across the spectrum of HIV, from acquisition through pathogenesis, treatment, and cure, and explore potential mechanisms and gaps in knowledge.