The flow of a simple gas along a plane surface under the action of tangential temperature gradient is considered. The velocity of thermal slip is calculated by the variational method with account of the effect of surface forces. It is shown that, in some situations, surface forces can substantially affect the value of the thermal slip coefficient.