How do we know that hydrogen gas consists of two hydrogen atoms?
Assuming ideal gas behavior we can determine the molar mass $M$ of the hydrogen gas from its density $\rho$ (which can be measured) by the following formula
$$
    M = {{RT\rho}\over{p}}\ \, .
$$
At STP $\rho \approx 0.09 \, \mathrm{g} \, \mathrm{L}^{−1}$ so the following back-of-the-envelope calculation 
$$
    M = {{8.31 \, \mathrm{L} \, \mathrm{kPa} \, \mathrm{K}^{−1} \, \mathrm{mol}^{−1} \cdot 273.15 \, \mathrm{K} \cdot 0.09 \, \mathrm{g} \, \mathrm{L}^{-1}}\over{101.325 \, \mathrm{kPa}}}\ = 2.02 \, \mathrm{g} \, \mathrm{mol}^{−1} \, .
$$

shows that $M$ is indeed close to 2 g/mol which means that hydrogen gas consist of $\ce{H2}$ molecules rather than $\ce{H}$ atoms