Origin: orig. term in cricket: from the practice of rewarding with a new hat the feat performed by a bowler taking three wickets on successive balls
See hat trick in American Heritage Dictionary 4
Origin: From the hat with which the feat was traditionally rewarded in cricket.
Learn more about hat trick