The aim of this paper is to study the difference gap function (for brevity, DG-function) and upper error bounds for an abstract class of variational-hemivariational inequalities with history-dependent operators (for brevity, HDVHIs). First, we propose a new concept of gap functions to the HDVHIs and consider the regularized gap function (for brevity, RG-function) for the HDVHIs using the optimality condition for the concerning minimization problem. Then, the DG-function for the HDVHIs depending on these RG-functions is constructed. Finally, we establish upper error bounds for the HDVHIs controlled by the RG-function and the DG-function under suitable conditions.