It evolved from the word "ferrier," which means "ironworker." The word "fer" in French means "iron," which is related to the English word "iron," and the suffix "-ier" indicates a person who works with that material.
So, a farrier is literally someone who works with iron, specifically in the context of horseshoes.