She expressed her thanks for the gift.

Literal

She [topic-は] that gift [target-に] thanks [genitive-の] words [object-を] stated.

述べる ('to state, express') is more formal than 言う, fitting the noun phrase 感謝の言葉 ('words of gratitude'). The に marks the recipient/target of the thanks — literally 'addressed her gratitude to the gift,' though English would say 'for the gift.' This pattern, [target]に + [emotion]の言葉を + 述べる, is a stock formula in formal speeches and ceremonies: お祝いの言葉を述べる ('offer congratulations'), お悔やみの言葉を述べる ('offer condolences'), 感謝の言葉を述べる ('express thanks').