The term spin doctor first appeared in the New York Times during Ronald Reagan’s campaign for re-election in 1984.
“Spin” is the twist given a baseball by a pitcher throwing a curve ball to deceive the batter, while a “doctor” is someone who fixes a problem.
Therefore, a “spin doctor” is someone who, faced with a political problem, solves it by putting a twist on the information to bend the story to his or her own advantage.