The adiabatic, relativistic, and quantum electrodynamics (QED) contributions to the pair potential of helium were computed, fitted separately, and applied, together with the nonrelativistic Born-Oppenheimer (BO) potential, in calculations of thermophysical properties of helium and of the properties of the helium dimer. An analysis of the convergence patterns of the calculations with increasing basis set sizes allowed us to estimate the uncertainties of the total interaction energy to be below 50 ppm for interatomic separations R smaller than 4 bohrs and for the distance R = 5.6 bohrs. For other separations, the relative uncertainties are up to an order of magnitude larger (and obviously still larger near R = 4.8 bohrs where the potential crosses zero) and are dominated by the uncertainties of the nonrelativistic BO component. These estimates also include the contributions from the neglected relativistic and QED terms proportional to the fourth and higher powers of the fine-structure constant α. To obtain such high accuracy, it was necessary to employ explicitly correlated Gaussian expansions containing up to 2400 terms for smaller R (all R in the case of a QED component) and optimized orbital bases up to the cardinal number X = 7 for larger R. Near-exact asymptotic constants were used to describe the large-R behavior of all components. The fitted potential, exhibiting the minimum of -10.996 ± 0.004 K at R = 5.608 0 ± 0.000 1 bohr, was used to determine properties of the very weakly bound (4)He(2) dimer and thermophysical properties of gaseous helium. It is shown that the Casimir-Polder retardation effect, increasing the dimer size by about 2 Å relative to the nonrelativistic BO value, is almost completely accounted for by the inclusion of the Breit-interaction and the Araki-Sucher contributions to the potential, of the order α(2) and α(3), respectively. The remaining retardation effect, of the order of α(4) and higher, is practically negligible for the bound state, but is important for the thermophysical properties of helium. Such properties computed from our potential have uncertainties that are generally significantly smaller (sometimes by nearly two orders of magnitude) than those of the most accurate measurements and can be used to establish new metrology standards based on properties of low-density helium.