I know that there is an adverse pressure gradient on the upper surface of the wing, which leads to boundary layer separation.
Is there any condition under which there is no such adverse pressure gradient on the wing?
At the trailing edge of the upper surface, you will always have a pressure recovery as low pressure from the upper surface converges toward the high pressure from the bottom surface at its trailing edge. This is the adverse pressure gradient since pressure is increasing along the chord length. The gentler the pressure recovery, the less likely is the airfoil to have an adverse boundary layer velocity profile, which is the source of flow separation and stall.
Since most of the lift is through the suction from the upper surface, I don't think you will encounter a practical airfoil without pressure recovery.