The unseeded Ostapenko became the first Latvian to reach a major final with a 7-6 (7-4) 3-6 6-3 victory on Court Philippe Chatrier.
The second seed did find a way through to get the match back on serve at 3-4 but Halep broke immediately again and went on to set up a clash with 20-year-old Latvian Ostapenko. "I'm just happy with the way I celebrated my birthday!" said Ostapenko as the crowd sang 'happy birthday'.
"I'm not ashamed to say that she played better", said Bacsinszky.
"I'm ready to face her, and I'm ready to face another final".
Bacsinszky, in her second slam semi-final, turned 28 while Thursday brought an end to Ostapenko's teenage years. Halep just has to be more consistent with her serve in order for easier matches to take place.
Halep saw three break points come and go in the next game but the Czech held firm as she edged closer to levelling the match up.
Ostapenko's best chance of winning the final will be to play a similar way against the wily Halep, who can reach world number one if she takes the title. I have the mentality to win, but it's gonna be tough. She had gone more than 1½ years without winning a title at any level. "But I was working on the forehand, and I think it's pretty good now".
She has 245 winners from six rounds - more than Andy Murray's 174 after five matches. Bacsinszky indeed tried different tactics to throw Ostapenko off her game but they didn't work. Halep has won 11 of her last 12 matches on clay court.
That being said, Halep will want to clean up her performance after netting only 14 winners against Pliskova, per the IBM Slamtracker, leaning somewhat on her opponent's 55 unforced errors to advance.
Logic suggested the steady approach she adopted after losing the first-set tiebreak would get the job done for the experienced Swiss, not the white-knuckle rollercoaster tennis Ostapenko was playing. However, her attacking style resulted in several winners and unforced errors in equal measure.
It looked like the same might happen in the third when Bacsinszky fought back from 3-1 to 3-3 but Ostapenko had learned her lesson and clinched victory with a forehand into the corner, her 50th victor.
Ostapenko would become the first unseeded player to win here since Mima Jausovec in 1983.
"I'm really happy", Ostapenko said. She can pretty much do it all: "she's aggressive, not afraid to come to the net", Pierce said.
Pierce is picking Halep to prevail over Karolina Pliskova of the Czech Republic in the semis and qualify for the Roland Garros final on Saturday.
Ostapenko unleashed a series of impressive winners in the tiebreaker and took the set with a backhand volley.