Guild
Lets say we have an bronze age or iron age village which grows into a town. It's population expands and as such there are more people who need (for example) carpentry done by a full time carpenter in said town and can pay for it. So you get more carpenters emerging and being able to make a living doing that job. These carpenters will also often work on projects together, pooling their efforts and skills and sharing tools. This leads to cooperation in other things. If one guy's workshop burns down, the others pitch in with money, resources and effort to rebuild it to get him back on his feet. They also help train up new carpenters, work together to make sure that they get a decent income by agreeing on prices for their work and helping each other out when they get down on their luck. In general cooperation between carpenters is better for everyone than having them being rivals working against each other. Over time, this fellowship of carpenters gets more formalized in the way it functions and eventually emerges as an institution with recognition by the established government known as a Guild.
In one way or another this rough system emerged in many societies. Once Guilds get official recognition, they generally get legal privileges in regards to their area of expertise. If your city has a guild of armorers, don't try to make or sell armor in the city if you are not a guild member, the armor you make is not up to snuff or both. These guys got a reputation and bank accounts to maintain and undermining either one of them will go bad for you. As they regulated the affairs of manufacturing and various services in preindustrial societies, Guilds could become very wealthy and powerful in their own right. Sometimes they become unofficial rivals to the landed nobility, sometimes they get an official voice in the official government. They also often ended up being controlled by a select few stuffy old bastards who were set in their ways, pocketed as much money as they could and would do anything they could to keep hold on power, especially when it meant quashing upstarts with clever new ways of doing things that would upset their preferred order of things.
Those versed in the ways of /v/ might recognize the term used to designate groups of players working towards a common goal, but most of the time this ends up being "raiding" and "kill big stuff", meaning there's little difference in between them aside from overall skill level.