Your script misses to load the places library from google api. Either you have to check if there’s an option to enable google.maps.places.Autocomplete in the script you have or add the missing file.
Check here:
https://developers.google.com/maps/documentation/javascript/places#loading_the_library