This study is devoted to ab initio calculations of the ground state properties of the Mn2NiGa Heusler alloy in the austenitic and martensitic phases. The calculations were performed using an approach in which exchange correlation effects are taken into account via the generalized and metageneralized gradient approximations. The martensitic phase includes four low symmetry structures: the tetragonal unmodulated and three-, five-, and seven-layer modulated monoclinic structures. It is shown that both approximations predict the martensitic transformation between the cubic austenitic and unmodulated martensitic phases, as well as the presence of modulated structures in the martensitic phase. However, the considered approximations lead to opposite behaviors of the energy of the structures and the modulation amplitude with an increase in the modulation period. Namely, these characteristics increase within the generalized gradient approximation and decrease within the metageneralized gradient approximation.