To increase the capacity and performance of communication systems, the new generation of mobile communications (5G) will use frequency bands in the mmWave region, where new challenges arise. These challenges can be partially overcome by using higher gain antennas, Multiple-Input Multiple-Output (MIMO), or beamforming techniques. Yagi-Uda antennas combine high gain with low cost and reduced size, and might result in compact and efficient antennas to be used in Internet of Thins (IoT) sensors. The design of a compact multilayer Yagi for IoT sensors is presented, operating at 24 GHz, and a comparative analysis with a planar printed version is shown. The stacked prototype reveals an improvement of the antenna’s main properties, achieving 10.9 dBi, 2 dBi more than the planar structure. In addition, the multilayer antenna shows larger bandwidth than the planar; 6.9 GHz compared with 4.42 GHz. The analysis conducted acknowledges the huge potential of these stacked structures for IoT applications, as an alternative to planar implementations.