If the payment is genuinely “ex-gratia” ie is not a payment that is due to the employee pursuant to the terms of their contract (salary, notice pay, holiday pay or contractual bonus payments), it may be paid to the employee without any tax deductions up to £30,000 (see section 403 of the Income Tax (Earnings and Pensions) Act 2003 (ITEPA)). Any payment over that will be subject to income tax in the normal way.
Taxation of ex-gratia payments can be complex and appropriate legal and tax advice should be taken by both the employer and employee before a settlement agreement is finalised.