When someone “gets your goat,” it usually means you’ve lost your temper or become angry enough to be distracted.
It’s a term that came from a horse trainer’s practice of putting a goat in a stall with a skittish racehorse to keep him calm before a big race.
An opponent or gambler might arrange for the goat to be removed by a stable boy, which would upset the horse and its owner and then mess up their chances of winning.
We say someone’s “got his goat” when somebody is upset.