The moment of leaving or just before someone departs; often used in phrases like 'on the way out' or 'as one was leaving.'
帰り際に店員さんにお礼を言って店を出た。
I thanked the clerk as I was leaving the shop and went out.
彼は帰り際に『またね』と軽く手を振った。
As he was leaving, he gave a light wave and said, 'See you.'
帰り際に傘を忘れないように気をつけてください。
Be careful not to forget your umbrella when you leave.
パーティーの帰り際にプレゼントを渡された。
I was given a present as I was leaving the party.