Explanation
A gratuity is a voluntary gift or tip, not required by contract, while compensation is payment for services rendered or work done. Therefore, compensation is the antonym because it implies an obligatory payment rather than a discretionary one.