Infrared has a frequency of 300 GHz – 430 THz, while WiFi has a frequency of 2.4 GHz or 5 GHz.
As the frequency of infrared is greater than the frequency of WiFi, the transfer rate (bitrate) of IR should be greater than WiFi.
In reality, IR transmission is in Kbps, while WiFi for WLAN is about 100 Mbps.
We know that a greater frequency wave can carry more bit data, but it is difficult to handle interference such as thick wall obstacles, therefore lower coverage range, and vice versa for lower frequency.
That statement only applies between mobile cellular band LTE (2.3 GHz) and WiFi (2.4 GHz) where WiFi bitrate is higher than LTE, but not between IR and WiFi.
Edit: I said Kbps after I read random article about IR Remote.