We theoretically investigate the critical behavior of a second-sound mode in a harmonically trapped ultracold atomic Fermi gas with resonant interactions. Near the superfluid phase transition with critical temperature ${T}_{c}$, the frequency or the sound velocity of the second-sound mode crucially depends on the critical exponent $\ensuremath{\beta}$ of the superfluid fraction. In an isotropic harmonic trap, we predict that the mode frequency diverges like ${(1\ensuremath{-}T/{T}_{c})}^{\ensuremath{\beta}\ensuremath{-}1/2}$ when $\ensuremath{\beta}<1/2$. In a highly elongated trap, the speed of the second sound reduces by a factor of $1/\sqrt{2\ensuremath{\beta}+1}$ from that in a homogeneous three-dimensional superfluid. Our prediction could readily be tested by measurements of second-sound wave propagation in a setup, such as that exploited by Sidorenkov et al. [Nature (London) 498, 78 (2013)] for resonantly interacting lithium-6 atoms, once the experimental precision is improved.