Gauff became the youngest player to qualify for the Wimbledon main draw. She also became the youngest challenger since 1991 to win in the first round of the ladies' singles.
Williams, who is a five-time winner at Wimbledon, was the oldest player in the women's field. Gauff described Williams as one of her idols ahead of their match.
Gauff won the first set 6-4 with 10 winners and only two unforced errors, with one of those being a double-fault. Williams had six winners and 13 unforced errors.
Gauff sealed the match with another 6-4 win in the second set. She finished with 18 winners and eight unforced errors, while Williams had 16 winners and 26 unforced errors.
"[Venus Williams] said, 'Congratulations,'" Gauff told reporters. "I told her thank you for everything that you did. I wouldn't be here without you. I always wanted to tell her that."
The 15-year-old star moves on to play Magdalena Rybarikova in the next round.
In other Wimbledon action, Naomi Osaka suffered a major upset at the hands of Yulia Putintseva in the first round.
Osaka, who was ranked No. 1 in the world until last week, has now failed to reach the second week at the past two majors. Previously, she had won two consecutive Grand Slam titles, posting victories at the Australian Open this year and the U.S. Open last year.
Osaka had 38 unforced errors, while Putintseva only had seven. It marked Osaka's second loss to Putintseva on grass this season.