Roger Federer is competing on clay this season and the competition in Rome is his second on the surface of 2019.
Due to poor weather on Wednesday, the Swiss superstar had to play twice on Thursday beating Joao Sousa before facing Coric.
And Federer needed a third set tie-break where he saved two match points to overcome the Croatian Coric 2-6 6-4 7-6.
But the 20-time Grand Slam winner was just glad to be on the winning side again.
“It was very tight, I got very lucky again today,” Federer admitted.
“I got lucky in Madrid. It’s nice to get lucky sometimes I guess, I’ve lost a lot of heartbreakers too throughout the years so it’s nice to win these.
“Borna is a great guy, super fair play, it was tough but it was fair.
“First set was very difficult, for me anyway, I really struggled to see the ball, there was a lot of shade on the court.
“I was always in two minds, wasn’t sure if it was in or out on my side and on his.
“He did well, he’s a very steady player so I couldn’t chase the lines so I couldn’t hit many winners.”
Federer will next face Greek Stefanos Tsitsipas or Italian Fabio Fognini as preparations for the French Open continue.
And Federer mentioned earlier in the week how he wants to learn more about his game while in Italy.
Asked about his hopes for the week, Federer told the ATP: “I’m hoping for some extra information that could help me for Paris.
“But at the end of the day, I’m here to enjoy myself, enjoy the city, the food, the fans, the court here in Rome.
“I’ve been coming here since 1999 or 2000 and I love being here.
“This might be my favourite city in the world away from Switzerland so this is a special place for me.
“I also played the juniors in Italy a lot so I love this country and its people. I was really in the mood to come here after Madrid instead of being home and practising.
“The weather in Switzerland is not nice so that helped and I think also losing against Thiem helped to give myself the weekend off.
“The coming here yesterday and practising a little bit in the afternoon and again this morning, I feel like having some fun on the clay and see what happens. Any result is a good result so I am happy about that.”