The emergence of synchronization in a network of coupled oscillators is a fascinating topic in various scientific disciplines. A coupled oscillator network is characterized by a population of heterogeneous oscillators and a graph describing the interaction among them. It is known that a strongly coupled and sufficiently homogeneous network synchronizes, but the exact threshold from incoherence to synchrony is unknown. Here we present a novel, concise, and closed-form condition for synchronization of the fully nonlinear, non-equilibrium, and dynamic network. Our synchronization condition can be stated elegantly in terms of the network topology and parameters, or equivalently in terms of an intuitive, linear, and static auxiliary system. Our results significantly improve upon the existing conditions advocated thus far, they are provably exact for various interesting network topologies and parameters, they are statistically correct for almost all networks, and they can be applied equally to synchronization phenomena arising in physics and biology as well as in engineered oscillator networks such as electric power networks. We illustrate the validity, the accuracy, and the practical applicability of our results in complex networks scenarios and in smart grid applications.