The players met Rajapaksa at his residence on Monday prior to their departure for India after recovering from their injuries sustained during the ongoing Indian Premier League.
Gambhir and Nehra were treated by Eliyantha White on Rajapaksa's request.
"Gambhir and Nehra thanked President Rajapaksa and Dr White for their speedy recovery," a release from the Presidential Secretariat said.
"The two players also thanked Sri Lankan cricketer Tillakaratne Dilshan, who is now playing in the IPL, for recommending treatment in Sri Lanka and making arrangements for it through the President," it further read.
Gambhir suffered a hamstring injury during Daredevils' first home game against Mumbai Indians, while Nehra has been suffering from a rib injury he picked up during training in Mohali before the team's first IPL game.
Incidentally, star Indian batsman Sachin Tendulkar has also been successfully treated for a sports injury by Dr White at the request of Rajapaksa.
Hat-tricks in the IPL over the three seasons
Images: Obama, PM at White House
Lankan govt to challenge Fonseka's candidature
Bidding for new IPL teams put off to March 21
Dr Varghese Kurien shifted to Mumbai hospital