In many European cities guilds used to control most of the secondary sector during the medieval age, effectively preventing competition between craftsmen.
Was there anything comparable in the time before that? Specifically institutions that fixed market prices of goods, limited production output of businesses and controlled who would be allowed to work in a certain sector.
If not, how was business organized in the time? Was every free man allowed to buy, produce and sell anything he wanted within a city?
The Roman Empire doesn't seem to have had a formal legal control of business in the same way Medieval cities did with guilds. The question of market fairs is a bit more complex. We know they existed, and were probably controlled through local town governing authorities, but it is difficult to know how this impacted business outside of market days. The undeniable existence of permanent streetfront shops argues against an idea of mercantile activity being overly restricted outside of those days.
The closest thing to a guild structure you will find are the collegia. I'll paste in a discussion I gave of them a few days ago:
The most well known labor organization of sorts in the Roman world was the collegium, which became prominent and important seemingly everywhere across the empire, although the specific modes of organization seem to have differed. For example, merchants in the East seem to have primarily organized themselves along communal lines (religious, ethnic, familial etc) while evidence from Lyon seems to point towards merchants organizing themselves along specific goods carried. This, of course, is not easily applicable to other professions, but it shows some of the diversity.
Anyway, collegia seem to have begun as religious and burial organizations, but they quickly acquired commercial and social characters. This is all rather difficult to untangle and requires using a lot of varied evidence. I'll just give three, to give an idea: In Egypt, the environmental conditions allow for the survival of documentary papyrus and so we know an awful lot about collegia there, and we see a great deal of market organization and negotiation in the documents. In Asia Minor, literary evidence allows us to see examples of certain workmen organizations opposing the activity of the imperial elite (specifically the orator Dio Chrysostom) and prevailing, their collective economic interests defeating a very well connected person's political interests. In Pompeii, we see graffiti showing the prominent social role of collegia, and we even have wall paintings of something like festival floats. The problem with integrating is that these are fundamentally different types of evidence—we have no grafitti and wall paintings in Egypt, no papyri in Asia Minor, no literary descriptions for Pompeii. So are the role of collegia the same everywhere, but we just have different sets of evidence? Or are they actually very different?
The collegia do not seem to have had the same sort of legal control over business as guilds did, but they may have wielded extensive social control, and they could directly control the activities of its members. For example, we have papyri from Egypt that describe how a particular collegium sold the right to engage in certain types of economic activity to one of its members, and the punishment for those who attempted to engage in that economic activity in competition with the person who bought the contract.
Well, for one thing, the huge city of rome entirely depended on grain imports from Egypt. All roads lead to Rome: so, aside from maybe small luxury trade between the smaller cities, everything was organised around feeding Rome and its citizens.