To knock on wood or to touch wood is done to ward off unlucky consequences, get rid of evil spirits, to undo something that is said that could possibly tempt fate or to bring good luck. One can also knock on wood three times after talking about something lucky or serendipitous, in order to ward off the evil spirits who might purposely ruin it.
It is believed by some that the superstition dates back to ancient pagan times and the belief that spirits or deities lived in trees, and knocking on the tree or touching it would acknowledge them and call upon them for protection from misfortune. It was also seen as a thank-you gesture to the spirits or gods for bringing good luck and blessings.
Irish folklore states that the act of touching wood sends a thank you to leprechauns for some good luck. The Greeks worshiped the Oak tree because it was sacred to Zeus and the Celts believed in spirits living in trees. Touching those trees brought good luck.
As many early pagan beliefs became part of Christian beliefs, this superstition may have been one of them. Some people believed that knocking on wood was associated with the Cross. A Jewish version of the superstition traces back to the Spanish Inquisition of the 15th century. The Jews fled to wooden-built synagogues for refuge and came up with a specific knock code to be let in. These refuges saved many lives, and it then became common to knock on wood to bring good luck.
By the 1800s, even children’s games included rhymes about knocking on wood for luck. By the 1900s, the Americans and British were doing the same.
Today, it is acceptable to knock on wood-like surfaces for good luck. There are times when people even knock on their own heads for luck when there is no wood around.