Gauff, who became the first American woman since Serena Williams in 2015 to win the women's singles title in Paris less than a year ago, overcame an early scare after Townsend broke serve at the start of the contest.
The world No. 2 responded strongly, recovering from the deficit and reeling off the final seven games of the match.
The 21-year-old admitted afterwards that Townsend's aggressive opening caused problems early on, but she quickly settled into rhythm.
Gauff dominated the second set, winning 25 of 34 points and surrendering only four points on serve in a one-sided 6-0 finish.
"I had thoughts about what if I lose and stuff," Gauff said.
"Honestly, I kind of remembered that tennis is two out of three sets, and I think Rome taught me a lot about my ability after losing the first set and stuff.
"I felt like Taylor came out playing really great tennis, and I just felt like if she continues to play like this and she wins a match like this, then she deserves to win and I could walk away and be like, I just wasn't good enough today.
"I didn't allow myself mentally today to get to that point where I feel like in the past I would."
The victory extended Gauff's winning streak on the Paris clay to eight matches and ensured she avoided becoming only the fourth defending women's singles champion in the Open era to lose in the opening round at Roland-Garros.
Fresh from a runner-up finish in Rome, Gauff will next face Egyptian qualifier Mayar Sherif in the second round.