There is more than one device that is known as an "IoT Gateway" device. The specific OS support depends on the individual vendor (there are devices from Advantech, Asus, Dell, et al. In general, the underlying hardware architecture for most of these devices is similar to a PC, so they generally can support a range of operating systems. Depending on the specialization of the I/O devices, there may be some holes. Best bet is to see the individual datasheets for the devices to see which operating systems are supported. Most should support some version of Linux.