The US Open winner Gauff trailed 4-2 in the opening set after giving up a break of serve.
However, the 20-year-old responded forcefully, winning the next ten games without a single response to complete the triumph in just over an hour.
In the following round, third-seeded Gauff will take on Caroline Garcia of France, who defeated Naomi Osaka of Japan.
In their third-round match, Garcia defeated four-time major winner Osaka 7-6 (7-4) 7-5.
Machac dramatically defeated Murray in Miami.
Leading player Iga Swiatek advanced as well, defeating Czech Linda Noskova 6-7 (7-9) 6-4 6-4 after trailing behind in the first set.
In an attempt to achieve the “Sunshine Double,” which entails winning both the Miami Open and Indian Wells in the same year, Swiatek will take against Russian Ekaterina Alexandrova in the round of 16.
The four-time Grand Slam champion from Poland won the Indian Wells championship on March 17. Should she advance all the way in Miami, she will become just the second woman to accomplish the Sunshine Double twice. The only other woman to accomplish that is Steffi Graf, who took first place in both the 1994 and 1996 competitions.
“As you can see, it’s not like we can take everything for granted,” Swiatek stated. “At the beginning of the competition, you can be in danger. It makes no sense to discuss Sunshine Double.”