The No.4-seeded Sharapova had to battle back from 1-3, 0-30 down in a marathon 64-minute second set to record a 63 64 victory against Nara, who won her first WTA title a few weeks ago in Rio.
"She made me work extremely hard," Sharapova said. "She's a really quick opponent, got a lot of balls back, as you saw, and she made me hit a lot. She made me try to do too much in certain situations.
"Sometimes I felt like I was doing the right mistakes and sometimes I felt like I should have been more patient, but I guess those are the situations you want to build that match confidence again."
Sharapova is coming off one of her tougher losses - a third round loss at Indian Wells, where she was the defending champion, and Camila Giorgi - the woman who beat her - was a qualifier in the draw.
The four-time Grand Slam champion and former No.1 was asked where her confidence is right now.
"I still feel like a work in progress," Sharapova commented. "That match strength, when you're deep into the match and just in the later stages of matches, I think that's the thing that's hurt me in these last couple of months. But I've got to work through that. Nothing's just going to come to me.
"It's a challenge I have ahead of me, and I have to face it."
Sharapova leads Safarova in their head-to-head, 2-1, and has won their last two meetings.
"I'm so happy with my win today," Vekic said afterwards. "It was a very tough match today and the conditions were tough too, and she played a great match, so I'm so, so happy to have won that one.
"I've played four days in a row now and I'm really looking forward to that day off tomorrow!"