In Saxon times you would have used the original form of this word, was hail, to greet or say goodbye to somebody; it literally meant “be in good health”. By the twelfth century, it had become the salutation you offered as a toast, to which the standard reply was drinc hail, “drink good health”. (Hail is an older form of our modern word hale, “health; well-being” and is also closely connected with hail meaning “to salute, greet, welcome”.)
The toast seems to have come over with the Danes; by the twelfth century the Norman conquerors of Britain regarded was hail as one of the most characteristic sayings of the country. Later on, the word came to be used also for the drink in which the toast was offered, especially the spiced ale or mulled wine that was drunk on Christmas Eve or Twelfth Night.
In the western counties of Britain, the tradition grew up on Twelfth Night of toasting the good health of the apple trees that would bear the crop from which next year’s cider would be made. Pieces of bread soaked in cider might be placed in the crooks of trees, guns were fired to ward off evil spirits, and special songs were sung:
Let every man take off his hat
And shout out to th'old apple tree
Old apple tree we wassail thee
And hoping thou will bear.
Ceremonies like these have almost entirely died out, though one or two are self-consciously kept alive in Somerset.