What is Guild?

Legal Definition
A guild is a group of merchants who control the practice of their craft in a particular town. The earliest types of guild were formed as confraternities of tradesmen. They were organized in a manner something between a professional association, trade union, a cartel, and a secret society. They often depended on grants of letters patent by a monarch or other authority to enforce the flow of trade to their self-employed members, and to retain ownership of tools and the supply of materials.

An important result of the guild framework was the emergence of universities at Bologna (established in 1088), Oxford (at least since 1096) and Paris (c. 1150).
-- Wikipedia
Legal Definition
A voluntary association of persons pursuing the same trade, art, profession or business, such as printers, goldsmiths, wool merchants, etc., united under a distinct organization of their own, analogous to that of a corporation, regulating the affairs of their trade or business by their own laws and rules, and aiming, by co-operation and organization, to protect and promote the interests of their common vocation. In medieval history these fraternities or guilds played an important part in the government of some states; as at Florence, in the thirteenth and following centuries, where they chose the council of government of the city. But with the growth of cities and the advance in the organization of municipal government, their importance and prestige has declined. The place of meeting of a guild or association of guilds, was called the "Guildhall." The word is said to be derived from the Anglo-Saxon "gild" or "geld," a tax or tribute, because each member of the society was required to pay a tax towards its support. See Guild rents.
-- Black's Law Dictionary
Legal Definition
A fraternity or company. Guild hall, the place of meeting of guilds. Beame's, Glanville, 108 (n).
-- Bouviers Law Dictionary
Legal Definition
See Gild.
-- Ballentine's Law Dictionary