We use Nielsens geometric approach to quantify the circuit complexity in a one-dimensional Kitaev chain across a topological phase transition. We find that the circuit complexities of both the ground states and non-equilibrium steady states of the Kitaev model exhibit non-analytical behaviors at the critical points, and thus can be used to detect both {it equilibrium} and {it dynamical} topological phase transitions. Moreover, we show that the locality property of the real-space optimal Hamiltonian connecting two different ground states depends crucially on whether the two states belong to the same or different phases. This provides a concrete example of classifying different gapped phases using Nielsens circuit complexity. We further generalize our results to a Kitaev chain with long-range pairing, and discuss generalizations to higher dimensions. Our result opens up a new avenue for using circuit complexity as a novel tool to understand quantum many-body systems.