Developmental precursors to children's early understanding of gratitude were examined. A diverse group of 263 children was tested for emotion and mental state knowledge at ages 3 and 4, and their understanding of gratitude was measured at age 5. Children varied widely in their understanding of gratitude, but most understood some aspects of gratitude-eliciting situations. A model-building path analysis approach was used to examine longitudinal relations among early emotion and mental state knowledge and later understanding of gratitude. Children with a better early understanding of emotions and mental states understand more about gratitude. Mental state knowledge at age 4 mediated the relation between emotion knowledge at age 3 and gratitude understanding at age 5. The current study contributes to the scant literature on the early emergence of children's understanding of gratitude.