This is one of the most popular superstitions. People knock on wood after
boasting, making a prediction, or speaking of good fortune.
Since wood comes from trees, this belief stems from ancient tree folklore. Down
through the ages people believed that trees were the homes of gods. These were
kind obliging gods if approached in the right way. In asking a favor of the tree
god one would touch the bark. After the favor was granted the tree was again
knocked as a sign of thanks.
Another common idea was that spirits that were jealous of human happiness were
always nearby. It was supposed that if one knocked on wood these spirits
couldn't hear any good news being discussed.