Is inertia real reason for flow separation? Consider airflow around square object, when an air particle A comes to the rear edge of an object. It is very logical that the particle would not turn at 90 degrees and follow back side of object, because inertia keeps it from going in a straight line (by Newton's first law). Same thing happens at a wing when AoA is too "sharp" for air to follow wing surface.
Why is then flow separation described by adverse pressure gradient?

 A: In a sense, inertia is part of the picture of flow separation but it seems you are mixing up many different things at the same time, so it's useful to unpack what is happening in more detail.
You cite inertia as a reason for flow separation and suggest this is a different (perhaps more physical/accurate or better) explanation than "adverse pressure gradient" for the cause of separation. Inertia is a property of a fluid parcel and a consequence of Newton's first law, as you note. So it's worth recalling what the first law says (in common parlance), emphasis mine:

A body in motion stays in motion, and a body at rest stays at rest, unless acted upon by a force.

So the fluid particle is moving and it wants to keep moving, unless it is acted on by a force. Which forces are in play and how do they affect the behavior?
For that, we need to turn to Newton's second law, which is easily stated as $F = ma$. Which for a fluid problem takes a more complicated looking form, that of the Navier-Stokes equations:
$$ \frac{\partial \rho u_i}{\partial t} + \frac{\partial \rho u_i u_j}{\partial x_j} = -\frac{\partial p}{\partial x_i} + \frac{\partial}{\partial x_j} \tau_{ij} $$
where the first term on the left-hand side is the acceleration of the fluid ($ma$), and the second is the convection of the fluid. On the right hand side are all of our forces, in this case we have a pressure gradient force $\partial p /\partial x_i$ and a viscous force $\partial \tau_{ij} /\partial x_j$.
From this, we can see that the only things that can change the inertia of our fluid is a pressure gradient, or a viscous force. If we have a favorable pressure gradient, that means the pressure gradient is making our fluid particle accelerate in its direction of travel -- so it keeps going faster and faster.
On the other hand, if we have an adverse pressure gradient, our fluid particle is being pushed backwards by a pressure force -- it is going to slow down along its direction of travel. Eventually, if the force is strong enough for long enough, the fluid particle can stop completely and might even start moving backwards. This is what we call a separated flow.
To sum it all up:

*

*Yes -- the fluid inertia is very intimately involved in the process of flow separation.

*But -- this is not inconsistent with the statement that adverse pressure gradients cause flow separation. The pressure gradient is the force that acts on the fluid parcel, causing it to slow down and eventually separate.


There's another point that I need to bring up about your specific example of the flow over a square cylinder. In that instance, we usually don't consider it to be a "flow separation" problem in the same sense as a boundary layer detaching from a wing at high angle of attack.
In the square cylinder, the flow is attached to the surface over the entire top side and then it doesn't turn 90 degrees because there is no force acting on it that is strong enough to make it turn 90 degrees. Instead, it gradually starts to turn because the pressure in the wake of the square cylinder is lower than the pressure outside the wake -- there is a pressure gradient in the vertical direction, which is the force that turns the fluid.
For a wing at a high angle of attack, that is where the adverse pressure gradient is usually discussed. This is almost always in relation to a boundary layer that leaves the surface of the body before the body ends. Here, the pressure gradient along the body slows the flow down near the wall until the flow stops completely, and this is flow separation in that context.
In both cases, the inertia of the fluid particle is changed due to forces and in both cases the forces in action are due to gradients in pressure. But talking about flow separation due to adverse pressure gradients is almost always in the context of boundary layer separation before a body ends, and not in the more general case of wakes behind bodies.
For the wake behind a body, the particles start to deflect because of pressure gradients perpendicular to the direction of travel, which are neither favorable nor adverse. Favorable and adverse are only used to describe pressure gradients parallel to the direction of travel.
A: You are right. The particle cannot flow around the sharp edge because inertia prevents it.
But there are few sharp corners on airfoil surfaces, and exactly for that reason.
But airfoils still suffer from flow separation. Even in the absence of sharp corners.
So there are two mechanisms for separation. One only needs inertia to be explained. The other has to add viscosity into the picture. As you might know, if you neglect viscosity (as potential flow theory does), separation happens only at the sharp trailing edge of an airfoil, precisely because the flow cannot negotiate this sharp corner. Potential flow theory calls this the Kutta condition.
But reality is more complex. Every air molecule is in a dynamic equilibrium between inertial, pressure and viscous effects: Inertial means that the mass of the particle wants to travel on as before and needs force to be convinced otherwise. Pressure means that air particles oscillate all the time and bounce into other air particles. The more bouncing, the more force they exert on their surroundings. Viscosity means that air molecules, because of this oscillation, tend to assume the speed and direction of their neighbors. And at a moving surface the molecules tend to assume the speed of this surface, so a boundary layer starts to grow along the direction of flow on that surface. Since such a surface will be part of a body, air needs to make way for that body's volume by speeding up (at least in subsonic flow). With that higher speed comes more friction and when the air has to slow down when the body cross section contracts again past its point of maximum thickness, it will decelerate. Now we have that negative pressure gradient, and in the already slowed down boundary layer it might drop local speed to zero. Which is the condition for separation in the absence of sharp corners.
Aerodynamics also knows leading edge separation which is basically caused by the inability of the flow to go around an inclined, sharp leading edge. This can be observed on delta wings at high angle of attack.
A: Just to illustrate the question about flow around square cylinder we compute animation with using stable fluids algorithm. Please, pay attention that separation line starts from the leading edge, and not from the rear one.

