5G wireless systems will extend mobile communication services beyond mobile telephony, mobile broadband, and massive machine-type communication into new application domains, namely the so-called vertical domains including the smart factory, smart vehicles, smart grid, smart city, etc. Supporting these vertical domains comes with demanding requirements: high-availability, high-reliability, low-latency, and in some cases, high-accuracy positioning. In this survey, we first identify the potential key performance requirements of 5G communication in support of automation in the vertical domains and highlight the 5G enabling technologies conceived for meeting these requirements. We then discuss the key challenges faced both by industry and academia which have to be addressed in order to support automation in the vertical domains. We also provide a survey of the related research dedicated to automation in the vertical domains. Finally, our vision of 6G wireless systems is discussed briefly.