without knowing your vehicle (manufacturer, make and model) I can tell you I'm guessing; However, Landy is onto something. My nephew's truck had a charcoal canister to vent to outside air when gas fumes needed to be vented. There is a sensor, and a small valve that opened to allow the gas fumes to get out.
How do I know it was that? MIL (check engine light) was on, I plugged in my handy dandy obd2 reader, got the codes, looked it up was indicating the valve wasn't working right. His was under the bed of the truck near the gas tank on the frame rail.