In this work, we analyze the three-step backward differentiation formula (BDF3) method for solving the Allen-Cahn equation on variable grids. For BDF2 method, the discrete orthogonal convolution (DOC) kernels are positive, the stability and convergence analysis are well established in [Liao and Zhang, \newblock Math. Comp., \textbf{90} (2021) 1207--1226; Chen, Yu, and Zhang, \newblock SIAM J. Numer. Anal., Major Revised]. However, the numerical analysis for BDF3 method with variable steps seems to be highly nontrivial, since the DOC kernels are not always positive. By developing a novel spectral norm inequality, the unconditional stability and convergence are rigorously proved under the updated step ratio restriction $r_k:=\tau_k/\tau_{k-1}\leq 1.405$ (compared with $r_k\leq 1.199$ in [Calvo and Grigorieff, \newblock BIT. \textbf{42} (2002) 689--701]) for BDF3 method. Finally, numerical experiments are performed to illustrate the theoretical results. To the best of our knowledge, this is the first theoretical analysis of variable steps BDF3 method for the Allen-Cahn equation.