An infinite-dimensional approach to path-dependent Kolmogorov equations