Day, 17, out-lasted the 35-year-old Lucic-Baroni 6-4, 5-7, 7-5, rallying from a break down in the third to reach the third round.
Lucic-Baroni served for the match in the final set, but the young American, who won the US Open junior title last year, kept her nerve.
"It was a really close match throughout the entire match. I think I started to really believe I could win at 6-5 in the third. It was still a really tough game, because I was a little bit tight to close it out. But my serve had been giving her a lot of problems, so I knew if I stuck to my game it might work out."
Muguruza was firmly in control having raced to a 5-0 lead in the second set before Flipkens began to make inroads on the Spaniard.
More From This Section
"It's always difficult to close out your first match," Spain's Muguruza said. "She's a very talented player, unbelievable, with a very different game. I got nervous!"
In other action, Australian Open quarter-finalist Johanna Konta held off Heather Watson 6-4, 6-4 in an all-British battle to reach the third round.
After pocketing a see-saw first set that saw five breaks of serve, Konta appeared to be on her way with two service breaks for a 4-1 lead in the second.
After Watson held at love, Konta got another chance and didn't falter, moving on in her first tournament since a foot injury forced her out of the WTA Tour's Middle East Swing after the Australian Open.
"I think there is definitely an adjustment period," said Konta, who like all 32 seeded players enjoyed a first-round bye. "I hadn't played a tour match since the Australian Open and Fed Cup was about three weeks ago. It's not that long of a time, but in terms of the tour, it's a bit of time.
Third seeded Czech Karolina Pliskova faced a potentially tricky tournament opener against Puerto Rico's Olympic gold medallist Monica Puig.
Pliskova is aiming to improve on her semi-final run at Indian Wells last year. She has already won two titles in four events this year, at Brisbane and Doha, and coming into the week led the WTA in aces served with 140.