The Swiss made his return on Wednesday, beating British No 1 Dan Evans in three sets.
He made a fine start against Basilashvili, with a comprehensive first set performance.
But Federer clearly tired as the match progressed and Basilashvili saved one match point before getting over the line.
“I honestly expected to feel this way,” Federer said.
“The whole shoulder, I feel the muscle pain around that.
“I didn’t expect that, I’d been serving the whole time but I think that comes with the pressure. In matches you just go that extra 5 per cent.
“Overall, the body is actually fine. I’m happy. I felt fine, a little stiff in the morning but that’s totally normal, I think.”
“I’m happy that I was able to play back-to-back three set matches against top players,” he continued.
“That’s a big step forward for me. I’m not at 100 per cent yet, I can see it, I can feel it.
“Important to be 100 per cent by the grass. This is a stepping stone. I’m happy with how I felt on court.”
Meanwhile, Basilashvili recorded his first ever win over Federer in his second meeting against the 20-time men’s singles Grand Slam champion.
“Thank you. For sure [it is a special moment],” Basilashvili said.
“It’s unbelievable, he’s one of the greatest of all time in tennis.
“To just play [against] him means so much to me. I’m very happy that he’s come back and is playing again and for sure to win against him is a dream come true for me.
“He was always my idol and I’m sure to many tennis players and fans, he’s an unbelievable player so I’m extremely happy.”