Robust and efficient image alignment remains a challenging task, due to the massiveness of images, great illumination variations between images, partial occlusion, and corruption. To address these challenges, we propose an online image alignment method via subspace learning from image gradient orientations (IGOs). The proposed method integrates the subspace learning, transformed the IGO reconstruction and image alignment into a unified online framework, which is robust for aligning images with severe intensity distortions. Our method is motivated by a principal component analysis (PCA) from gradient orientations that provides more reliable low-dimensional subspace than that from pixel intensities. Instead of processing in the intensity-domain-like conventional methods, we seek alignment in the IGO domain, such that the aligned IGO of the newly arrived image can be decomposed as the sum of a sparse error and a linear composition of the IGO-PCA basis learned from previously well-aligned ones. The optimization problem is tackled by an iterative linearization that minimizes the l1 -norm of the sparse error. Furthermore, the IGO-PCA basis is adaptively updated based on incremental thin singular value decomposition, which takes the shift of IGO mean into consideration. The efficacy of the proposed method is validated on the extensive challenging datasets through image alignment, medical atlas construction, and face recognition. The experimental results demonstrate that our algorithm provides more illumination- and occlusion-robust image alignment than the state-of-the-art methods.