Waterfalls wear the soft rock away and leave the lip without support. Eventually, the lip breaks and crashes to the bottom of the waterfall and as a result, the lip moves back upstream.
As the waterfall moves back, so it leaves a gorge below it. This picture shows a beautiful waterfall and its gorge.