Answer:
Greater gravity compresses the gas, making it denser and hotter, so the outward pressure increases. In any given layer of a star, there is a balance between the thermal pressure (outward) and the weight of the material above pressing downward (inward). This balance is called hydrostatic equilibrium.