Gas pressure is directly related to the number of gas molecules in a given volume and their average kinetic energy. As gas molecules move randomly and collide with the walls of the container, they create pressure by transferring momentum to the walls. The greater the number of gas molecules and their speed, the higher the gas pressure will be.