Ostapenko demonstrated a forceful and aggressive game throughout, but had many unforced errors.
During the final set, Ostapenko was leading 4-1 before Ying-Ying managed to tie the game. At the ninth game Ostapenko was awarded a score only after asking for a review.
A Baltic duel is in store for Friday when Ostapenko is to face Estonia's Anett Kontaveit (WTA 33).
Meanwhile Latvia's second tennis star Anastasija Sevastova (WTA 15) is to face former world #1 Maria Sharapova (WTA 48) in the second round of the Australian Open.
The Australian Open in Melbourne takes place until January 28 with a prize pool of around €36 million.