As the Cornell Center for Materials Research explains, gas can be transformed into a solid directly with specific conditions. The gas needs to be at a low temperature, as well as a low pressure, to essentially skip the phase of liquid.
A prime example would be the movement of carbon dioxide in a fire extinguisher from a gaseous state within, to being expelled in a fire emergency and transforming into solid flakes directly from the gas phase to put the fire out.
The exact opposite transformation of gas into a solid happens with dry ice. The dry ice sublimates from the solid block of carbon dioxide into a gas, skipping the liquid phase entirely.