I think it was an ancient Naval term. They had a rope with knots in it (about a foot or so apart). On one end there was a bucket attached. When sailing, they would through the bucket in the water. The bucket would pull the rope along with it, and they would count the knots in the rope that went by. They deduced they're speed in knots.