The four-time Grand Slam champion won 3-6, 6-3, 6-4 on Wednesday, a day after the quarterfinal started.
Sharapova had trailed 4-0 when rain halted play. After more wet weather delayed the restart, she couldn't erase the deficit in the first set but gritted out the win to improve to 12-0 in three-set matches this year.
"I think that rain break gave me a few hours to think about things,'' Sharapova said in an on-court interview afterward. "I came out so flat yesterday; she came out on fire. She's so tough.''
The 11th-seeded Bartoli was in the U.S. Open quarterfinals for the first time.
In the fourth round Sunday, the third-seeded Russian was down a break in the third set to Nadia Petrova before rallying after an hour-long break. She next faces top-ranked Victoria Azarenka, who finished her match Tuesday.
Sharapova broke Bartoli's serve at 4-4 in the decisive set to put herself in position to serve out the match. The Frenchwoman saved two break points and earned a game point, but Sharapova pressured her into three straight mistakes to go up 5-4.
Sharapova's 10th ace gave her match point.
Half of the other semifinal is also set after Sara Errani beat best friend and doubles partner Roberta Vinci.
The normally feisty Errani didn't pump her fist or even smile after clinching the 6-2, 6-4 victory. The two embraced at the net afterward, the 10th-seeded Errani looking far more relieved than joyful.
"We know each other very well. We played together many times,'' said Errani, this year's French Open runner-up. "So was also strange to see her on the other side of the net. Normally also when you walk on the court, we go together, we speak.''
Their matchup guaranteed an Italian woman would reach the semifinals at this tournament for the first time in the Open era, which began in 1968.
Wearing identical pink and black outfits in a mostly empty Louis Armstrong Stadium after rain disrupted the schedule, the two played a subdued match that often felt more like a practice than a Grand Slam quarterfinal.
Errani and Vinci, who won a French Open doubles title this year, have reached the semifinals together here.
Following Sharapova and Bartoli on Arthur Ashe Stadium was Andy Roddick, trying to postpone retirement against Juan Martin del Potro. The two were in a first-set tiebreaker when rain suspended play Tuesday night.
Janko Tipsarevic closed out a victory over Philipp Kohlschreiber in straight sets in another match spread over two days.
The eighth-seeded Serb will make his second straight quarterfinal trip here after beating Kohlschreiber 6-3, 7-6 (5), 6-2. He led 5-2 in the first set when play was suspended. Tipsarevic will next play fourth-seeded David Ferrer, who completed his match Tuesday.