Abrupt transitions are ubiquitous in the dynamics of complex systems. Finding precursors, i.e. early indicators of their arrival, is fundamental in many areas of science ranging from electrical engineering to climate. However, obtaining warnings of an approaching transition well in advance remains an elusive task. Here we show that a functional network, constructed from spatial correlations of the systems time series, experiences a percolation transition way before the actual system reaches a bifurcation point due to the collective phenomena leading to the global change. Concepts from percolation theory are then used to introduce early warning precursors that anticipate the systems tipping point. We illustrate the generality and versatility of our percolation-based framework with model systems experiencing different types of bifurcations and with Sea Surface Temperature time series associated to El Nino phenomenon.