Rudyard Kipling said it in February 1923, in a speech at the annual dinner of the Royal College of Surgeons in London, later printed as “Surgeons and the Soul” in his collection A Book of Words (Macmillan, 1928). The popular wording matches the printed text exactly.
What it means
Words act on people the way drugs act on the body: they can soothe, excite, poison or paralyse, and they change how we think. Kipling, speaking to surgeons, was calling himself a fellow dealer in powerful substances.
Where it comes from
Early in the speech, after a nod to that afternoon's Hunterian oration, Kipling explains why a writer is addressing surgeons: “I am, by calling, a dealer in words; and words are, of course, the most powerful drug used by mankind.” He continues: “Not only do words infect, ergotise, narcotise, and paralyse, but they enter into and colour the minutest cells of the brain.”
He goes on to argue that words and old stories are passed down and shape how people think over generations. The quoted sentence is usually shared without its first half, which makes clear that Kipling was speaking as a professional writer to a room of medical professionals.