The system of Gegenbauer or ultraspherical polynomials {Cnλ(x);n=0,1,…} is a classical family of polynomials orthogonal with respect to the weight function ωλ(x)=(1−x2)λ−1/2 on the support interval [−1,+1]. Integral functionals of Gegenbauer polynomials with integrand f(x)[Cnλ(x)]2ωλ(x), where f(x) is an arbitrary function which does not depend on n or λ, are considered in this paper. First, a general recursion formula for these functionals is obtained. Then, the explicit expression for some specific functionals of this type is found in a closed and compact form; namely, for the functionals with f(x) equal to (1−x)α(1+x)β, log(1−x2), and (1+x)log(1+x), which appear in numerous physico-mathematical problems. Finally, these functionals are used in the explicit evaluation of the momentum expectation values 〈pα〉 and 〈log p〉 of the D-dimensional hydrogenic atom with nuclear charge Z⩾1. The power expectation values 〈pα〉 are given by means of a terminating F45 hypergeometric function with unit argument, which is a considerable improvement with respect to Hey’s expression (the only one existing up to now) which requires a double sum.