We show how to accurately study two-dimensional quantum critical phenomena using infinite projected entangled-pair states (iPEPS). We identify the presence of a finite correlation length in the optimal iPEPS approximation to Lorentz-invariant critical states which we use to perform a finite correlation length scaling analysis to determine critical exponents. This is analogous to the one-dimensional finite entanglement scaling with infinite matrix product states. We provide arguments why this approach is also valid in 2D by identifying a class of states that, despite obeying the area law of entanglement, seems hard to describe with iPEPS. We apply these ideas to interacting spinless fermions on a honeycomb lattice and obtain critical exponents which are in agreement with quantum Monte Carlo results. Furthermore, we introduce a new scheme to locate the critical point without the need of computing higher-order moments of the order parameter. Finally, we also show how to obtain an improved estimate of the order parameter in gapless systems, with the 2D Heisenberg model as an example.