7805 needs correct decoupling capacitors mounted close-by to work properly - did you
use them?
By 9V battery do you mean those small PP3-size ones? They cannot produce much current,
gas sensors normally have a heater element that takes quite large currents, you need
to ensure the supply can power the load...