Muguruza saved a break point in her first service game but Erakovic converted the next opportunity to lead 3-1. When she held confidently to love and a 4-1 advantage, the world No74 looked the more confident player. There was a buzz through the crowd, singing more tunes - "All the Kiwis in the stands ... clap your hands" - but from there the match turned.
At the worst possible time Erakovic let the initiative swing away, giving up a soft break.
"I wasn't able to keep up that power up the middle. I maybe backed off the pedal a little bit and gave her a little foot in the door and she started connecting a little better," said Erakovic. "I need to go for a little bit more - especially when I see a little window and not just to play it safe. I need to be a little bit more aggressive."
Erakovic held for 5-4 - and was two points away from a set point in the next game - but that was as close as she got.
The Spaniard began to punish any short balls, particularly off the Erakovic second serve, and was relieved to wrap up the set.
"In the beginning I was really nervous and I had my doubts because it wasn't easy for me to play, [especially] against a player that I didn't know much about," said Muguruza. "But I think it was just time. I knew if I kept my level I would eventually have a chance to get back in the match."
The 20-year-old Muguruza looks a special player, potentially top 10 (currently ranked 24), and Spain have hopes of landing the Federation Cup with her in the fold. She showed her full range of abilities in the second set.
Erakovic lamented her struggles from the line (she landed just 51 per cent of first serves) and inability to find a plan B when she needed to.
"I wasn't able to refocus and analyse what was going on and once Garbine starts connecting she plays very well. It's obviously tough to lose first round of a Grand Slam but I have belief in my game. I'm hitting the ball well, it's just a matter of working on the mental side."
Erakovic remains in Melbourne to play doubles (with Monica Puig) while Michael Venus and Artem Sitak will get their doubles campaigns under way in the coming days.