  A comprehensive study of periodic trajectories of billiards within ellipsoids
in $d$-dimensional Euclidean space is presented. The novelty of the approach is
based on a relationship established between periodic billiard trajectories and
extremal polynomials on the systems of $d$ intervals on the real line. By
leveraging deep, but yet not widely known results of the Krein-Levin-Nudelman
theory of generalized Chebyshev polynomials, fundamental properties of billiard
dynamics are proven for any $d$, viz., that the sequences of winding numbers
are monotonic. By employing the potential theory we prove the injectivity of
the frequency map. As a byproduct, for $d=2$ a new proof of the monotonicity of
the rotation number is obtained. The case study of trajectories of small
periods $T$, $d\le T\le 2d$ is given. In particular, it is proven that all
$d$-periodic trajectories are contained in a coordinate-hyperplane and that for
a given ellipsoid, there is a unique set of caustics which generates
$d+1$-periodic trajectories. A complete catalog of billiard trajectories with
small periods is provided for $d=3$.
