Beer of the middle ages was rather different than it is today.
Most medieval beer was brewed with seasonings called gruit, instead
of hops, and nearly all of it was brewed as ale, rather than
lager.
The standards for brewing were applied to a minor degree by the
Church, which taxed all the seasonings in gruit. To a much greater
degree, however, the standards were applied by the brewers' guilds,
which varied from one place to another.
The first really widespread laws on brewing standards were the
Bavarian purity laws, which were perhaps intended primarily to
protect the system of taxation in Bavaria, rather than the quality
of the beer. These appeared in 1516, after the Middle Ages
ended.