Chronic pain affects 20% of adults and is one of the leading causes of disability worldwide. Women and girls are disproportionally affected by chronic pain. About half of chronic pain conditions are more common in women, with only 20% having a higher prevalence in men. There are also sex and gender differences in acute pain sensitivity. Pain is a subjective experience made up of sensory, cognitive, and emotional components. Consequently, there are multiple dimensions through which sex and gender can influence the pain experience. Historically, most preclinical pain research was conducted exclusively in male animals. However, recent studies that included females have revealed significant sex differences in the physiological mechanisms underlying pain, including sex specific involvement of different genes and proteins as well as distinct interactions between hormones and the immune system that influence the transmission of pain signals. Human neuroimaging has revealed sex and gender differences in the neural circuitry associated with pain, including sex specific brain alterations in chronic pain conditions. Clinical pain research suggests that gender can affect how an individual contextualizes and copes with pain. Gender may also influence the susceptibility to develop chronic pain. Sex and gender biases can impact how pain is perceived and treated clinically. Furthermore, the efficacy and side effects associated with different pain treatments can vary according to sex and gender. Therefore, preclinical and clinical research must include sex and gender analyses to understand basic mechanisms of pain and its relief, and to develop personalized pain treatment.