mid-14c., "a kind of door latch," and said to be still the name for rings for raising thumb-latches in the north of England, appears to be what it looks like: what you say when you open the door ("have good day;" cf. the 1414 record of them as hafgooddays).

Online Etymology Dictionary, © 2010 Douglas Harper