The variational iteration method (VIM) proposed by Ji-Huan He is a new analytical method to solve nonlinear equations. In this paper, a modified VIM is introduced to accelerate the convergence of VIM and it is applied for finding exact analytical solutions of nonlinear gas dynamics equation.