With the arrival of Industry 4.0, a key objetive in the manufacturing processes is to improve efficiency and productivity. To obtain this flexibility, the use of wireless communications such as Wi-Fi and 5G is necessary. Each of these technologies, which are the most promising for Industry 4.0 applications, has advantanges and disadvantages, thus it is important to compare the performance of both technologies in an industrial scenario. Therefore, this paper provides a performance comparison of 5G and Wi-Fi in terms of latency, throughput and packet loss for stationary and mobility cases. Our measurements show that 5G performs better than Wi-Fi regarding latency, especially in the mobility case. On the other hand, Wi-Fi performs better than 5G in terms of uplink throughput. Finally, we have also demostrated that the use of multi-connectivity is necessary to fulfill the reliability and latency requirements for the most critical applications.