Does the gravitational force of a gas change with its temperature? And why? I have read the paragraph below, somewhere-

Consider a sphere filled with gas. It will generate a spherically symmetric gravitational field outside itself, of strength proportional to the total mass.  If we now heat the gas, the gas particles will have this increased (relativistic) mass, corresponding to their increased kinetic energy, and the external gravitational field will have increased proportionally.

Now:
$1.$ Does the gravitational force of the gas increase by heating the gas as claimed above?
 $2.$  If the answer to my first question is yes. Then, is the explanation (increasing relativistic mass) correct?
 A: Yes the gravitational effect of a gas does increase if the gas is heated sufficiently. However the full calculation is a little more subtle than your reference suggests.
It best to think of the increase here as an increase in the energy of particles of the gas, and consequently the gas as a whole has a larger energy in the reference frame where the gas as a whole is not in motion. So you have a notion of rest energy of the gas, given by:
$$
E = \sum_i \gamma_i m c^2
$$
where the sum is over the molecules in the gas. This $E$ is the rest energy of the gas, and it increases with temperature. The rest mass of the gas is $M = E/c^2$.
The gravitational effects are determined partly by energy, and partly by pressure and stress. This makes the full calculation a bit more involved, but the main message is that all these effects are increased as the temperature goes up. Such effects are taken into account in the study of stars, for example, when we wish to be thorough and take relativistic effects into account.
A simple such model is the one called the interior Schwarzschild solution, where we treat a spherical 'star' whose density is constant, out to some finite radius $r_0$. This is not a precise model, but it serves to give an impression of the physics. In this case the orbits far from the star are those given by Newtonian physics if we assign to the star the mass
$$
M = \int \sqrt{|g_{00}|} (\rho c^2 + p) {\rm d}V
$$
where $\rho c^2$ is proper energy density (the sum of rest energy and kinetic energy of everything at each location in the star), $p$ is pressure, and ${\rm d}V$ is the proper volume element. In practice the contribution of pressure to this formula is insignificant for most stars, but the contribution of kinetic energy to the total energy density can be significant. For a treatment allowing a more realistic model of the density and pressure, the result goes by the names Tolman-Oppenheimer-Volkoff.
