The 22-year-old Krajinovic, ranked 107 in the world, breezed past number 153 Yuki Bhambri 6-3, 6-4, 6-4 in the decisive reverse singles that had been halted by bad weather on Sunday.
The Serbian, who was leading 6-3, 4-4 at the rain break, needed just an hour to wrap up the match and help his depleted team retain their place in next year's elite 16-nation World Group.
Serbia – the 2010 champions – were without world number one Novak Djokovic, Janko Tipsarevic and Viktor Troicki for the play-off tie in Bangalore.
Djokovic pulled out citing fatigue and family reasons after being stunned by Japan's Kei Nishikori in the US Open semi-final. Tipsarevic and Troicki were injured.
The Serbs were in the play-offs for the first time since 2007 after they lost to Roger Federer's Switzerland in the World Group first round in February.
Serbia had won both the opening singles on Friday before India fought back to draw level by winning the doubles on Saturday and the first reverse singles through Somdev Devvarman on Sunday.
Serbia's non-playing captain Bogdan Obradovic saluted his new-look team that made light of the absence of the top stars.
"These boys have taken time off from the circuit where they make their living to help their country stay in the World Group," said Obradovic.
"We knew that beating India in their own backyard would not be easy, so the team came here early to get used to the conditions. They practised hard with great dedication and deserved this win.
"It just goes to show how important Davis Cup is to our nation."
India will remain in the Asia-Oceania zonal competition for the third year in a row.
Meanwhile, five-time champions Spain's 18-year stay in the Davis Cup World Group came to an end on Sunday when they were defeated by Brazil in the play-offs.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ