Magnetic reconnection is invoked as one of the primary mechanisms to produce energetic particles. We employ large-scale three-dimensional (3D) particle-in-cell simulations of reconnection in magnetically-dominated ($sigma=10$) pair plasmas to study the energization physics of high-energy particles. We identify a novel acceleration mechanism that only operates in 3D. For weak guide fields, 3D plasmoids / flux ropes extend along the $z$ direction of the electric current for a length comparable to their cross-sectional radius. Unlike in 2D simulations, where particles are buried in plasmoids, in 3D we find that a fraction of particles with $gammagtrsim 3sigma$ can escape from plasmoids by moving along $z$, and so they can experience the large-scale fields in the upstream region. These free particles preferentially move in $z$ along Speiser-like orbits sampling both sides of the layer, and are accelerated linearly in time -- their Lorentz factor scales as $gammapropto t$, in contrast to $gammapropto sqrt{t}$ in 2D. The energy gain rate approaches $sim eE_{rm rec}c$, where $E_{rm rec}simeq 0.1 B_0$ is the reconnection electric field and $B_0$ the upstream magnetic field. The spectrum of free particles is hard, $dN_{rm free}/dgammapropto gamma^{-1.5}$, contains $sim 20%$ of the dissipated magnetic energy independently of domain size, and extends up to a cutoff energy scaling linearly with box size. Our results demonstrate that relativistic reconnection in GRB and AGN jets may be a promising mechanism for generating ultra-high-energy cosmic rays.