late 15c., gratulacyon "expression of thanks," from Latin gratulationem (nominative gratulatio) "a manifestation of joy, wishing joy, rejoicing," from past-participle stem of gratulari "give thanks, show joy," from gratus "agreeable" (from suffixed form of PIE root *gwere- (2) "to favor").
<a href="https://www.etymonline.com/word/gratulate">Etymology of gratulate by etymonline</a>
Harper, D. (n.d.). Etymology of gratulate. Online Etymology Dictionary. Retrieved $(datetime), from https://www.etymonline.com/word/gratulate