TL;DR
Quite simply, at a time when its somewhat violently-acquired neigbor suddenly receives military support and aid from the US and its allies, India's then non-aligned position was looking militarily naked.
India then looks to its bordering neighbors to see who it can turn to in terms of military procurement to stay ahead or at least on an equal footing.
The timing is fortuitous as with the death of Stalin, the Soviet Union enters a new phase, one that does not sit well with Mao in China.
At the same time the long on going friction between China and India over the Himalayan border overflows into outright hostility.
Both the Sino-Indian War and the Sino-Soviet split pretty much happen around the same time.
So, at this point, both the Soviets and India have a common enemy in China, and with the US also supplying its other neighbor, India can only see the Soviets as a viable option to procure military equipment from with which to engage both China and Pakistan.
The Soviet Union, with its new ally, backs India during the 1965 war with Pakistan, and then goes on to support it at the UN, vetoing US attempts at a ceasefire in the 1971 war with Pakistan resulting in the creation of Bangladesh.
For the Soviets, a stable ally in India means that US attempts to expand into the region, beyond Pakistan, are thwarted and Chinas expansions are also capped with India's Eastern border being the buffer zone.
In the following decade with the change of government in India, relations cooled with the Soviet Union but it nonetheless remained primary source for both military and economic aid.
This relationship was very simply inherited from the Soviet Union into Russia, with the latter continuing to offer close ties through a 'special and privileged strategic partnership'.
...........
That being said I diverge a bit in the following and look at current Russia-Indo relations recently:
With the broadest paintbrush, India's warmer-than-cold relationship with Russia is based both on history and within that the formers reliance on Russia providing its military equipment, 70 percent of it, including providing its nuclear-parity with prickly neighbor, Pakistan.
Very briefly, following its independence, India had a very short life span of staying true to its non-aligned position on the world stage. The US military support for Pakistan, and it joining a series of treaties and organisations that were perceived as threat to the security of India changed all that.
This worked well for the Soviet Union, seeking an ally in the third world and needed a local counter to the growing threat of US backed presence in the region, and so the two agreed to work more closely together militarily and otherwise.
Time wise this also matched with the sudden severing of ties between the Soviet Union and China in the early 1960s, the Sino-Soviet split. With the latter calling the Soviets brand of communism the work of 'revisionist traitors'.
Again this timed well as the Sino-Indian War between China and India erupted around the same time, and with no arms forthcoming from UK or the US, India had to turn to the Soviets who were only too willing to send military equipment to India to keep China at bay.
The Soviets willingness to supply arms to India cemented their ties as India went to war with Pakistan a short time later.
Post Cold War:
After the dissolution of the Soviet Union, India inherited its close relationship with Russia, and in addition to their ties in military, space, nuclear and politics, both countries, in 2014, set a target of reaching US$30 billion in bilateral trade by 2025.
https://www.financialexpress.com/economy/russian-indian-funds-to-invest-1-billion-in-infrastructure/18126/
Bilateral ties with Russia are a key pillar of India's foreign policy. India
sees Russia as a longstanding and time-tested friend that has played a
significant role in its economic development and security.
Indo-Russian cooperation in the military technical cooperation sphere has
evolved from a simple buyer-seller framework to one involving joint research & development, joint production and marketing of advanced defence technologies and systems
Third Indo−Pakistani War:
Prior to 1971, India's global position had been to be in a position of non-alignment. However, with the growing cooperation between neighboring Pakistan with both the US and China posing a threat on its doorstep, this changed significantly when they signed a Treaty of Friendship and Cooperation with the Soviet Union that year. From now on, the Soviet Union would be an ally of India and would support it politically and militarily.
Following Pakistan's hostile movements later that year, India launched a massive military offense both to the West and the East. At the UN, the Soviet Union, now backing India, vetoed US efforts for a ceasefire, allowing India's supported separation of East Pakistan from Pakistan in the West, thereby creating Bangladesh. When the US sent a task force in to the Bay of Bengal to curb India's potential for invading Pakistan, the Soviet Union responded by supporting India with its own task force of nuclear armed cruisers and submarines to counter the US presence.
Trade:
Bilateral trade has been growing steadily. Trade in 2009 was US$ 7.5
billion, in 2010 US$ 8.5 billion, and in 2011 it reached US$ 8.9 billion. In 2011, Russian exports to India amounted to US$ 6.1 billion and imports from India to Russia amounted to US$ 2.8 billion. Estimates for 2012 indicate the trade touching US$ 10 billion. The two-way investment between the two countries stands at approximately US$ 7.8 billion.
Civil Nuclear program:
Russia has been a long standing partner of India in nuclear energy and
recognizes India as a country with advanced nuclear technology. The construction of the Kudankulam Nuclear Power Project is being built with Russian collaboration.
Space program:
India's space program has long worked closely with Russia, culminating in India's quest to build a crewed space station of tis own.
Currently its crew are being trained in Russia, the space suits are being produced in Russia.
https://economictimes.indiatimes.com/news/science/india-russia-sign-pact-to-deepen-space-cooperation/articleshow/88130854.cms?from=mdr
https://www.thehindubusinessline.com/news/science/india-russia-space-collaboration-takes-flight-again/article29340757.ece
Missile development:
India maintains a close working relationship with Russia for its own development of missile technology.
The latest of which is hypersonic vehicle technology.
Pakistan uses China for the same ends.
https://www.reuters.com/world/india/russia-starts-missile-supplies-india-despite-us-sanctions-risk-2021-11-14/
https://theprint.in/defence/india-among-few-countries-developing-hypersonic-missiles-us-congressional-report-says/754703/
https://eurasiantimes.com/indias-hypersonic-brahmos-ii-missile-program-russian-zircon-missile/
Nuclear parity:
India has much stronger conventional armed forces than Pakistan, but both countries have comparable nuclear arsenals. Both development histories broadly follow their military procurement and relationships - Pakistan's was through China and India is through Russia.
Pakistan has 140-150 nuclear warheads compared to India’s 130-140 warheads, according to a 2018 report
India’s indigenously built nuclear-powered ballistic missile submarine became operational in 2019, giving the country a “nuclear triad” – the ability to launch nuclear strikes by land, air and sea, was viable through its long term relationship with Russia enabling it to rent and train its own Naval staff using Russia's nuclear boats.
Pakistan is working on sea-launched cruise missiles to complete its own triad as it does not have access nor is capable of, building its own nuclear submarines, ballistic missile capable or otherwise. It is however upgrading its conventional submarine fleet through China.
https://www.reuters.com/article/us-india-kashmir-pakistan-nuclear-factbo-idUSKCN1QI4O5
https://www.nti.org/analysis/articles/pakistan-submarine-capabilities/
https://sgs.princeton.edu/sites/default/files/2019-11/mian-ramana-nayyar-2019.pdf
Apparently, a large proportion of Russians polled view India positively, whilst similarly, another 2017 poll states that Russians identified India as one of their top five friends, with the others being Belarus, China, Kazakhstan and Syria.
https://timesofindia.indiatimes.com/india/delhi-still-among-top-five-friends-of-moscow-says-poll-by-russian-think-tank/articleshow/64768148.cms