This paper extends the SPH method to gas simulation. The SPH (Smoothed Particles Hydrodynamics) method is the most popular method of flow simulation, which is widely used in large-scale liquid simulation. However, it is not found to apply to gas simulation, since those methods based on SPH can't be used in real-time simulation due to their enormous particles and huge computation. This paper proposes a method for gas simulation based on SPH with a small number of particles. Firstly, the method computes the position and density of each particle in each point-in-time, and outlines the shape of the simulated gas based on those particles. Secondly the method uses the grid technique to refine the shape with the diffusion of particle's density under the control of grid, and get more lifelike simulation result. Each grid will be assigned density according to the particles in it. The density determines the final appearance of the grid. For ensuring the natural transition of the color between adjacent grids, we give a diffuse process of density between these grids and assign appropriate values to vertexes of these grids. The experimental results show that the proposed method can give better gas simulation and meet the request of real-time.