In the ancient Greek and Roman world it was among others at one symposium
It is customary to offer libations to the gods by pouring a few drops of wine on the ground. This was equally as a donation to the dead, the Greek writer Lukian (120-180 BC) noted that the souls nourished by the libations. On ships, this is still common practice today, at the beginning of a trip or after successful maneuvers the sea god Poseidon (Neptune) a few drops of mostly schnapps
to send. The amount must be well-dosed, because a "too little" can upset him and lead a "too much" to a storm.
Under Customs in viticulture
is a comprehensive list of relevant keywords related to rituals, festivities and customs "around the wine".