Both of these sentences would be okay, and people would understand.
In the second sentence, the slightly wrong grammatical part is that the pronoun "it" should refer to the gas, but instead refers to the area. What I mean is that the *area* wasn't well ventilated - if you were referring to the gas you would probably say it wasn't well *vented*. For example, "Gas would have had to accumulate in a certain area where it wasn't well vented."
I think it would be more clear to say instead: "Gas would have had to accumulate in a certain area which was poorly ventilated."