Ostapenko, who turns 20 on Thursday, persevered through two rain delays and hit 38 winners, compared to just six for Wozniacki.
Ostapenko faces 30th-seeded Timea Bacsinszky in Thursday's semifinal. Bacsinszky defeated Frenchwoman Kristina Mladenovic 6-4, 6-4 to reach the semifinals at Roland Garros for the second time in three years.
Wozniacki of Denmark won the first set but couldn't match Ostapenko's style of play over the final two sets. Ostapenko dominated play in the final set after the second rain delay to improve to 4-0 all-time against Wozniacki.
"Being aggressive is my style of game and I was just trying to play aggressive today," Ostapenko said after the match. "I felt quite confident after we stopped in the third set and I won five games in a row. I think the last couple of games, I was just playing really, really well."
Ostapenko overcame 50 unforced errors while prevailing on court Suzanne-Lenglen.
"At first, the conditions were really tough," Ostapenko said. "It was really windy at times. She was playing really good ... I tried to play aggressive every shot. It was really tough but I think I found my game."
The unseeded Ostapenko is ranked 47th in the world and displaying poise for a player who is the youngest in the field.
"I feel 19 years old, I turn 20 in two days," Ostapenko said. "It is my first semifinalist ever. I am going to try to enjoy it because great players are here and it is a great place to play."
Bacsinszky also celebrates a birthday Thursday. She turns 28.
The Switzerland native had to fight the blustery conditions and the pro-French crowd cheering on Mladenovic while prevailing on Court Philippe Chatrier.
"I'm really happy and proud," Bacsinszky said afterward. "For many years, big things have happened for me at Roland Garros. I'm really happy to be through to my second semifinal here. I feel really privileged."
The winds played havoc on both players and caused clay to trickle up around eye level. Factor in that the first delay lasted over three hours and it was a day in which the mental aspect of the game was vitally important.
"It was really difficult because we had all the seasons rolled into one today," Bacsinszky said. "We had a sand storm, a hurricane and we almost had snow too. It was really tough to keep my concentration all day long."
But even after falling behind 3-1 in the second set, Bacsinszky didn't wilt and won five of the final six games to finish off Mladenovic and return to the semis.