In a little-known story linking the two countries, Digvijaysinhji Ranjitsinhji Jadeja sheltered Polish children evacuated from Siberia where they were deported by the Soviet Union when war broke out.
The Indian leader, accompanied by families of some of the children saved, laid flowers at a red-marble monument crowned with a lotus sculpture, built in honour of the maharaja in the Polish capital.
"For all the children in the camp, the maharaja was a substitute father," Agnieszka Michalowska, daughter of the late Wieslaw Stypula, who spent six years in India, told AFP.
"After the tragic experiences in Siberia, he simply gave them peace, stability and a sense of security", added Michalowska.
Despite the rain, around 200 people gathered for a ceremony attended by Modi who "asked me questions about my father, about his impressions and reflections," Michalowska said.
Knowing Polish history, the maharaja founded a children's home to host Polish orphans in the western state of Gujarat, and provided them with everything they needed, including European cuisine.
Gujarat is where Modi was chief minister before he launched his national political career.
'Second life'
But it was above all his character and his attachment to children that earned him the nickname "Good Maharaja", said Monika Kowaleczko-Szumowska, author of a book about the story.
"Don't think of yourselves as orphans. You are now Nawanagarians, I am Bapu, the father of all the inhabitants of Nawanagar, including yours," he would tell the children.
"The Good Maharaja welcomed these children like family," Kowaleczko-Szumowska said, adding he "treated them like his guests" rather than refugees.
The maharaja, who died in 1966 at the age of 70, also ensured that it was a truly Polish settlement, with a national flag, a school, a church and Polish scouts.
"My father used to say that India had become a second home for each of them. This country simply gave them a second chance, a second life," said Agnieszka Michalowska.
After the war, to prevent the children from being sent back to communist Poland, the maharaja, with two other camp leaders, formally adopted 200 children so that they could decide their own fate.
Most of them chose other countries to settle in, but Michalowska's father, Wieslaw Stypula, returned to Poland in 1948.
He became an engineer but devoted his life to telling the maharaja's story, writing books and compiling an extensive archive, now digitalised and with the Institute of National Remembrance (IPN).
"He wanted to tell this story, to pass on the fact that it was India, an exotic country so far away... that really saved a few thousand Polish refugees", Michalowska said.
India hosted more than 5,000 Polish refugees during World War II.
When Stypula died last May, Michalowska and her mother received condolences from the son of the maharaja who knew the Polish children.
Few are still alive, but the memory of the "Good Maharaja" is cultivated in Poland.
In addition to a square named after him, a school in Warsaw bears his name, while in 2016 the Polish parliament paid tribute to him in a special resolution.