There are a number of things that could lead to a medicinal taste, but it mostly comes down to excess production of phenols.
Chlorine has already been suggested and this happens by the chlorine combing with malt phenols to form a class of compounds called chlorophenols, which have a pronounced medicinal aroma.
Or it could be a wort spoiling orgaism, such as a bacteria or wild yeast, which has a propensity to develop loads of phenols.
Or it could be the fermentation temp. Too high a temp could lead to producing too many phenols.
Cheers
MAH