India has agreed to buy as much as $500 million worth of U.S. computers and manufacturing technology as part of its effort to leap ahead in the development of modern industries, diplomatic and business sources said yesterday.

The sale involves the highest level of technology ever allowed to go to India under U.S. export-control laws, and provides the strongest evidence to date of new, closer ties that have developed between the world's two largest democracies since Prime Minister Rajiv Gandhi visited Washington in June.

According to diplomatic sources, India will be able to use the computers and technology for military as well as civilian and industrial purposes. The contract between Control Data Corp. and the Indian government is expected to be signed in New Delhi today .

Secretary of State George P. Shultz and Foreign Minister Bali Ram Bhagat agreed yesterday after a meeting here of the sixth session of the India-U.S. Joint Commission to accelerate the transfer of high technology and to find new ways to apply computers to problems in farming, education, commerce and science.

The agreement for the Control Data computer sale came after months of negotiations that included a major debate within the Reagan administration over whether India could be trusted to safeguard such a high level of technology from the Soviet Union, New Delhi's major arms supplier.

The United States, moreover, wanted assurances that the technology would not be used in India's nuclear program, which is not subject to international inspection even though it is capable of producing weapons. India exploded a nuclear device in 1974.

"This can be one of the strongest links between the United States and India," said former senator Charles Percy, who was hired as a consultant by Control Data because of his knowledge of India and his close ties to the Gandhi family.

"It sends a signal to U.S. business that technology transfer can take place with India and, as a matter of national interest, will take place. And it will help strengthen the Indian economy," he said.

It also will be a major shot in the arm for Control Data, the Minneapolis computer manufacturer that has suffered from a sluggish demand for computers.

While the first phase of the contract is for $27 million, it eventually is expected to be worth $500 million, and Control Data officials believe other Indian purchases in connection with the main contract could lift the full value as high as $2 billion.

In order to beat out a French firm, CII Bull, the Export-Import Bank of the United States offered India highly subsidized credit that includes a foreign-aid grant amounting to one-fourth of the total cost.

The eight-year deal calls for Control Data first to train Indian engineers in its plants here to make entry-level business computers and then to help a government corporation to manufacture the same product in India. Eventually, Electronics Computer India Ltd., a government-owned corporation, expects to produce an all-Indian computer based on Control Data's Cyber 810 and 830 models.

While considered a powerful machine, these are Control Data's entry-level mainframe computers that are about four years old and use computer technology that is 10 years old. They will, nonetheless, be the most powerful Indian-made computers.

The sale was made possible by the signing in November 1984 of a memorandum of understanding detailing steps India will take to make sure the Soviets will not be able to steal the advanced technology.

In the year since that memorandum was signed, the State Department reported that India purchased $1.3 billion worth of U.S. technology -- twice as much as it bought in the previous 12 months.

As a further sign of closer ties between the two countries, India for the first time since 1962 has begun buying American military equipment, including the technology and a manufacturing plant from ITT Corp. that will allow it to make its own night-vision goggles for foot soldiers and pilots.

Still pending is India's request to buy an American supercomputer, which is under serious consideration by the Reagan administration. The State Department has been pushing to allow the sale, but elements within the Pentagon want to attach so many conditions that the purchase will no longer be attractive to India, administration sources said.