Indeed, gasoline’s high volatility means that when its concentration hits a specific threshold, exposure to an open flame can lead to ignition or even explosion.
The absence of oxygen in an environment is the only scenario where gasoline would not ignite. Conversely, concentrations beyond the explosion limit prevent explosion, but in the presence of oxygen, ignition is inevitable.