The gas produced when magnesium metal reacts with an acid, such as sulfuric acid, to make magnesium sulfate is hydrogen gas (H2). This happens because magnesium displaces hydrogen from the acid, resulting in the formation of magnesium sulfate and the release of hydrogen gas as a byproduct of the reaction.