Dear friend,
Bonus is an annual payment that has to be paid compulsarily to all eligible employees as per Bonus Act.
Ex-gratia is a payment that can be paid by an employer to any employee, even if he/she is eligible for bonus or not, at the employer's sole discretion. This way, an employee who is eligible for bonus can get both bonus and exgratia or bonus only, and an employee who is not elible for bonus may or may not get ex-gratia.
If the bonus is not paid, you can always claim it, but ex-gratia is not claimable.
Regards,
T. Chandran