A high-dimensional potential energy surface (PES) for CO interaction with the Au(111) surface is developed using a machine-learning algorithm. Including both molecular and surface coordinates, this PES enables the simulation of the recent experiment on scattering of vibrationally excited CO from Au(111). Trapping in a physisorption well is observed to increase with decreasing incidence energy. While energy dissipation of physisorbed CO is slow, due to weak coupling with both the phonons and electron-hole pairs, its access to the chemisorption well facilitates fast vibrational relaxation of CO through nonadiabatic coupling with surface electron-hole pairs.