In one embodiment, a gas contamination detection apparatus includes a gas analyzer adapted to receive a sample of a gas to be delivered to a patient and to analyze the gas sample to determine whether the gas contains a contaminant, and a gas shut-off valve adapted to automatically prevent the gas from being delivered to the patient if the gas is determined to contain a contaminant.