Eighth seed Barty enjoyed her best major performance in a run to the quarter-finals at the Australian Open in January and she stylishly improved on that display.
Keys reached the last four at Roland Garros last year but the American struggled to get to grips with Barty's serve.
After coming under increasing pressure on her own serve, Keys bowed to the brilliant Barty, who can now look forward to a showdown with Amanda Anisimova after the teenager's sensational triumph over defending champion Simona Halep.
Keys won the first two points of the match on Barty's serve but neither player threatened a break until the eighth game when a stunning backhand from the Australian hared past her opponent at the net to seize the lead.
Barty maintained a resolute defence and clinched the opener just inside half an hour serving to Keys' forehand.
The start to the second set was steady again, before Barty let Keys off the hook with a tame return into the net at break point.
It was only a temporary reprieve, though, as the world number 14 sent a backhand long to gift Barty the advantage at 4-3, meaning a confident hold took her to the brink of a landmark victory.
However, serving for the match, Barty thrashed into the net to allow Keys to capitalise on her very first break point and level the set.
Keys failed to build on that foothold, though, and instead double-faulted to immediately hand Barty the advantage again, with the 23 year-old this time capitalising.