Permatex #2 is a pasty stuff that comes in a tube like toothpaste. It does stiffen up into a relatively non-gooey state. It never gets completely hard, just to the point that you can barely push a fingernail into it.
Permatex #3 is a thick liquid that comes in a plastic can with a brush under the lid. It's less stiff when it dries than the #2. You can paint some on a porous gasket, let it soak in for a few minutes, then paint a little more on just before installing the gasket. That gasket will peel off pretty much intact even years later, usually cleanly enough that another slathering will allow you to re-use the gasket for a few more years, as long as it's used on the same surface.
Neither is affected by gasoline, but either cleans off easily with alcohol.