English Original Sentence
I smell gas.
I read this as “I smell of gas”.
I smell gas.
I read this as “I smell of gas”.
My understanding is that huelo a gas is ambiguous, without context. The preposition a can be used to differentiate whether someone is purposefully/actively (without a) smelling something, vs incidentally/passively (with a) smelling something. For example, if I have a can of gas and I am inhaling it to see what it smells like…huelo gas. But if I’m just sitting at home and the smell of gas comes to me…huelo a gas. This makes sense with “I smell of gas” as well because smelling like something is a passive activity.
I didn’t notice before, but the English Tatoeba sentence has a couple other Spanish translations:
Me huele a gas.
Huelo gas.
This translation seems like a mixture of two idioms.