The new mobile technology, 5G, challenges the current scenario in communications by overcoming the flaws of currently working 4G. Such new technology offers to smart cities and intelligent transportation systems a new way to become fully integrated by allowing massive simultaneous connections and ubiquity of network, even under high mobility situations or dense populated areas. In this way, 5G will become a key enabler for real Internet of Things and its corresponding Internet of Vehicles. This discussion is aimed at providing, in a comprehensive manner, how 5G technology will impact on smart cities, intelligent transportation systems –including autonomous or semi-autonomous vehicles– and vehicular communications, its technical, economic and legal challenges, in the following years.