Both of these words originate from the medieval period of European history.
Gild is a verb meaning “to put a thin layer of gold, or an attractive appearance, on something.” Originally, gild referred specifically to gold (the origin of the word’s sound) and is still used this way. However, nowadays, one can also use gild metaphorically, such as in:
She gilded her speech with fancy vocabulary words in order to appear smarter.
And there’s an English saying, to gild the lily, which means “to add unnecessary decoration to something attractive” (the lily is a kind of flower).
Guild, on the other hand, is a noun referring to “an organization of skilled workers, such as carpenters, blacksmiths, or ship builders.” We mention here only such traditional crafts because the word guild is not often used for modern professions. The real guilds, in medieval times, combined some of the functions of unions and other professional organizations today, supporting and connecting people in these professions. The guilds were sometimes powerful, and sometimes secretive, organizations. You cannot use the word guild to refer to a union or similar organization today, unless they have chosen to call themselves a guild, which is not too common.