The Romanian hit 28 winners in the two hour, 34 minute match while the Aussie was undone by 57 unforced errors and nine double faults.
The win sees Halep advance to the third round for the fifth time in seven years where she will face 32nd seed Veronika Kudermetova.
Second seed comes back from the brink
Halep broke in the opening game of the match, but after a 16-point fourth game, the set was back on serve as the Romanian double-faulted on break point to make it 2-2.
Consecutive breaks gave Tomljanovic a 4-3 lead and she saved a break point to hold in the next game. A 15-minute affair ensued and Halep sent a forehand into the net on the Aussie's third set point to give her a one-set lead.
A sloppy game cost the world number 72 as Halep broke to start the second set, the first of four straight breaks. The world number two then had an easy putaway to break for a third time in the set and she served out the set to love to level the match.
Tomljanovic broke first in the third set as Halep overhit a forehand to give the Aussie a 2-0 lead. After breaking back, she was broken again as Tomljanovic pummeled a forehand off of a weak second serve.
A hold put the world number 72 a game away from the upset, but Halep fought back and at 5-5, a pair of unforced errors by Tomljanovic gave her the opportunity to close out the match.
Serving for it, the Romanian raced out to a 40-0 lead only to see Tomljanovic save the first. On the second, Halep put away a midcourt volley from the Aussie, who was stuck at the net, to complete a memorable comeback.