Due to the complex porous media structure of the longwall gob area, it has been difficult to determine the gas dispersion coefficient of oxygen when studying spontaneous coal combustion in the gob area. In this work, we first designed an experimental device for testing the gas diffusion coefficient of porous media. Then, the distribution law of gas concentration in porous media under different particle size conditions was obtained by experiments. Subsequently, we established a dimensionless mathematical model of gas dispersion in porous media and developed a corresponding numerical simulator based on the finite volume method (FVM). The influence of the dimensionless gas dispersion coefficient on the gas concentration distribution was analyzed, and then a dimensionless inversion method of the gas dispersion coefficient was summarized and put forward. Finally, we obtained the values of the gas dispersion coefficient in the experimental device under different particle size conditions by inversion and discussed its effect on the gas dispersion behavior in porous media. The results show that (1) the distribution of gas concentration obtained from the experimental test and numerical simulation is consistent, which verifies the reliability of our work; (2) the dimensionless gas concentration is the highest near the injection point and gradually decreases along the depth and both sides of the test container; (3) with the increase of the dimensionless gas dispersion coefficient, the distance required for uniform gas mixing in the test container is gradually shortened and the gas dispersion coverage is wider; and (4) the larger pore space facilitates the dispersion behavior of the gas, and the gas dispersion coefficient shows a parabolic trend with the increase of porous medium particle size.