First, as has often been stated here: "medieval"covers almost a thousand years, so it's hard to generalize about it. But I will give this a try.
A craft guild in Anglo-Saxon England had some aspects of a trade union, being formed of members of the same craft for mutual protection , mutual relief, and religious observances. But you likely mean the later, more important merchant guilds, which were much more like a trade association, and composed of owners. These would pretty much dominate the craft guilds ( for example, the cloth merchants at one point in the 12th c. had firm control over the weavers and fullers). The merchant guilds could set wages ( though the Black Death caused labor prices to rise regardless) and set working hours, but this was to regulate competition. They would arbitrate disputes between owners, regulate quality...but they did not operate for the benefit of the worker, and certainly did not organize workers to bargain for better conditions by threatening to withhold their labor.
Salzmann: English Industries in the Middle Ages