Beaten by American Jennifer Brady in her Brisbane International opener last week, the Australian arrived at Memorial Drive looking to build confidence ahead of the season's opening Grand Slam but was quickly on the back foot.
The 23-year-old dropped the opening set to Pavlyuchenkova before winning the second and storming to a 5-2 lead in the third, only to let the Russian claw back to 5-5.
Barty regained her composure, however, and broke Pavlyuchenkova before closing out a the match in steamy conditions.
"I definitely was able to find a bit more of my kind of style tennis and control the match a little bit more in the third," Barty told reporters.
"Credit to Anastasia ... We've always had very close ones. She pretty much controls the whole match. I'm just out here trying to do the best that I can."
The Australian will meet the winner of the match between compatriot and qualifier Arina Rodionova and eighth seed Marketa Vondrousova, who lost to Barty in the final of last year's French Open.
Rodionova, ranked world number 201, sprung the upset of the day by tipping former U.S. Open champion Sloane Stephens out of the tournament 6-2 6-2 on centre court. (Reporting by Ian Ransom; Editing by Peter Rutherford)