Resilience is a psychological trait that strongly predicts chronic pain–related health outcomes. The neural correlates of both pain and trait resilience are critical to understand the brain–behaviour relationship in chronic pain; yet, neural correlates of resilience in chronic pain states are unknown. However, measures of pain perception and a wide range of psychological health measures have been linked to function of the default mode network (DMN). Thus, we aimed to determine the relationships between resilience, pain perception, and functional connectivity (FC) within the DMN and between the DMN and other brain networks. Resting-state functional magnetic resonance imaging data were acquired from 51 chronic pain patients with a form of spondylarthritis (ankylosing spondylitis) and 51 healthy control participants. Participants completed a questionnaire on their individual trait resilience (the Resilience Scale), and patients reported their clinical pain. In healthy controls, we found within-DMN FC to be stronger in less resilient individuals. In patients with chronic pain, individual resilience was negatively correlated with pain and disease activity. Cross-network FC between the DMN and the sensorimotor network was abnormally high in patients with high clinical pain scores on the day of the study. Finally, there was an interaction between within-DMN FC and clinical pain report in patients: In patients reporting greater pain, the relationship between within-DMN connectivity and resilience was atypical. Thus, our findings reveal different neural representations of resilience and pain. The way in which these behavioural measures interact provides insight into understanding the neural correlates of chronic pain.