Gas permeation through nanoscale pores is ubiquitous in nature and plays an important role in a plethora of technologies. Because the pore size is typically smaller than the mean free path of gas molecules, their flow is conventionally described by the Knudsen theory that assumes diffuse reflection (random-angle scattering) at confining walls. This assumption has proven to hold surprisingly well in experiment, and only a few cases of partially specular (mirror-like) reflection are known. Here we report gas transport through angstrom-scale channels with atomically-flat walls and show that surface scattering can be both diffuse or specular, depending on fine details of the surface atomic landscape, and quantum effects contribute to the specularity at room temperature. The channels made from graphene or boron nitride allow a helium gas flow that is orders of magnitude faster than expected from the theory. This is explained by specular surface scattering, which leads to ballistic transport and frictionless gas flow. Similar channels but with molybdenum disulfide walls exhibit much slower permeation that remains well described by Knudsen diffusion. The difference is attributed to stronger atomic corrugations at MoS2 surfaces, which are similar in height to the size of transported atoms and their de Broglie wavelength. The importance of the latter, matter-wave contribution is corroborated by the observation of a reversed isotope effect in which the mass flow of hydrogen is notably higher than that of deuterium, in contrast to the relation expected for classical flows. Our results provide insights into atomistic details of molecular permeation, which so far could be accessed only in simulations, and show a possibility of studying gas transport under a controlled confinement comparable to the quantum-mechanical size of atoms.