Meaning:
Lit. “it’s the blacksmith who’s guilty, but they hung the Gypsy”. You use this expression to point at an injustice and suggest that a person or an institution with more power (social, financial or political) got away with their wrongdoing while another actor with much less influence took the blame and was punished.
The source of this saying is obviously with an important role wealthy smiths have played in rural Poland while travelling Roma traditionally being outcasts and blamed for whatever crime happened while they were around.