Funeral/condolence etiquette. ご愁傷さま (ごしゅうしょうさま) is the formal condolence phrase said to the bereaved — 愁傷 literally 'sorrow-wound'. でございます is the keigo copula, used in highly formal/ritual contexts. お悔み (おくやみ) is 'condolence, grief'. ひとこと ('one word, a single word') here means 'a brief greeting'. The entire sentence describes the ritual of offering the formal phrase.