What is the meaning of [one for the road]

Give me a beer. I’m having one for the road (a final drink before leaving).