By optimizing the parameters of neural network and applying it to gait recognition, we propose a gait recognition method based on optimized neural network. And we use gait Gaussian image to replace the most popular gait energy image in gait recognition. In this method, an eight-layer convolution neural network is built and initialized with the parameters of the well trained model Alexnet, which can speed up the model convergence and prevent over-fitting effectively. Compared with the traditional methods,the model training time is shortened and the model's expression ability is enhanced at the same time.Further, the gait Gaussian images of human motion are used to train the optimized neural network and update the parameters of the model, training with gait Gaussian image makes the expression of the model be better than the traditional training with gait energy image. To our knowledge, it is the first time to apply gait Gaussian image based neural network to gait recognition in existing researches, this is a breakthrough in the performance of the algorithm. Thus, we get an optimized neural network that can achieve gait recognition successfully. A satisfactory recognition result of the model was found by lots of experiments, especially when the targets carrying status or wearing coat. The experimental results show that the optimized neural network based gait recognition can speed up the model training. In addition，the optimization strategy well avoids over-fitting of the model, and the use of gait Gaussian image also makes the model better than the previous.