Gauff needed a lucky loser spot to take her place in the main draw after failing to qualify but could claim the title on Monday (AEDT) after a 6-4 6-4 defeat of Petkovic.
The 15-year-old American saved nine of 10 break points she faced and rallied from 2-0 down to win the first set before claiming the only break of the second to oust German Petkovic on Sunday (AEDT).
Gauff showed great defence and mixed up her game impressively, making Petkovic pay for a double fault which gave the teenager a 3-2 advantage in the second set.
The Florida native, set to move into the top 100 in the rankings on Monday, won 71 per cent of points on her second serve and broke new ground when she put away a textbook volley.
Ostapenko saved three match points in a battling 1-6 7-6 (7-5) 7-5 defeat of Ekaterina Alexandrova.
The 2017 French Open champion showed her fighting spirit to reach a first singles final of the year after fending off a match point in the second set and another two in the decider.