Yes it is compulsory that you use an actuarial valuation method but it is not compulsory to use the service of a qualified actuary.
IAS 19.59 says " This Standard encourages, but does not require, an entity to involve a qualified actuary in the measurement of all material post-employment benefit obligations. For practical reasons, an entity may request a qualified actuary to carry out a detailed valuation of the obligation before the end of the reporting period. Nevertheless, the results of that valuation are updated for any material transactions and other material changes in circumstances (including changes in market prices and interest rates) up to the end of the reporting period."
Although you need not get the service of an actuary, you need to value your gratuity plan as per actuarial valuation techniques as set out in IAS 18.66:
(a) to apply an actuarial valuation method (see paragraphs 67–69);
(b) to attribute benefit to periods of service (see paragraphs 70–74); and
(c) to make actuarial assumptions (see paragraphs 75–98).