For general initial data without any structural assumption, the Prandtl equations are usually ill-posed in the Sobolev space because the loss of tangential derivatives occurs in a non-local term. We will study the well-posedness property of the Prandtl equations in the critical Gevrey space of index 2. The proof combines a new cancellation mechanism with the abstract Cauchy-Kovalevskaya theorem, to overcome the difficulty of the loss of derivatives in the system.