The Senate gave overwhelming approval yesterday to a comprehensive bill to revise the nation's immigration laws and offer amnesty to millions of illegal aliens already in the United States. The vote was 76 to 18.

The bill represents the most sweeping overhaul of the immigration system in nearly two decades and the largest blanket-amnesty provision since President Carter's 1977 amnesty offer to the more than 13,000 draft offenders during the Vietnam war era.

Yesterday's vote marked the second consecutive year that the Senate has given strong and early approval to the legislative package aimed at regaining control of the nation's borders. Last August, it approved a similar measure, 80 to 19, but the companion bill died in the House. The current bill differs in several ways from a version approved May 5 by the House Judiciary Committee and not expected to reach the House floor until at least August.

Final agreement on immigration revision is considered more likely this year because the House leadership has indicated no intention to engage in delaying tactics used last year. The Senate bill's chief sponsor, Sen. Alan K. Simpson (R-Wyo.), was optimistic after yesterday's vote, despite more than a dozen amendments to the bill. "There isn't a thing in here that isn't reconcilable," he said. "What we started with, the guts of it, are still there: control over illegal immigration."

The bill would use a three-pronged approach to control a flow of immigrants currently estimated to comprise 30 to 50 percent of the nation's annual population growth of about 2 million.

It would impose sanctions, including fines of as much as $1,000 per alien, on those who employ at least four persons and knowingly hire illegal aliens. It also would authorize development of some type of national identification system to verify legal residency.

The bill also proposes to streamline procedures for deportation, asylum and exclusion, primarily by eliminating some layers of appeals and having others handled by administrative officials rather than judges. They and immigration employes currently are inundated with a backlog of 140,000 asylum requests alone.

The second major portion of the bill, dealing with legal immigration, would establish an annual ceiling of 425,000 for such immigrants and persons granted asylum--the same as the estimated current level. Refugees are tabulated in a separate category. It also would rearrange some admission preferences for relatives of adult U.S. citizens who migrate legally.

Under this section of the bill, the government would attempt to regulate better the flow of aliens brought in to work on temporary jobs that employers say Americans will not take. Growers in particular have complained about the flow-regulation program contending that it is too cumbersome to respond to unpredictable seasonal needs.

The revision bill seeks to end bureaucratic delays and, in a special response to growers' concerns, provides for the customary six-month grace period given all employers who hire illegals. It then would offer growers an additional three-year, phased period to legalize their entire work force.

The third major portion of the bill would provide a two-tiered legalization program for illegal aliens already in the country. A blue-ribbon federal commission on immigration and refugee policy estimated that there were between 3 1/2 million and 6 million illegal aliens as of 1978.

"Whatever the number five years ago, there are surely many more now," sponsors of the current Senate legislation said.

Those who can prove continuous residence since Jan. 1, 1977, and meet other general good-conduct requirements would immediately qualify for permanent-resident, or "green card," status. Those in residence since Jan. 1, 1980, would be eligible for immediate temporary-resident status and permanent-resident status three years later.

Permanent residents must wait a minimum of five years before applying for U.S. citizenship.

All of these legalized persons would be prohibited from receiving any federally funded, non-emergency public assistance for three years.

The House bill contains a single-tiered system granting permanent resident status to those who can prove residency since Jan. 1, 1982, but would prohibit non-emergency public assistance for five years. It also has no section limiting legal immigration or rearranging admission preferences.

In nearly every instance of Senate debate on the bill, liberals, led by Sens. Edward M. Kennedy (D-Mass.) and Alan Cranston (D-Calif.), were able to make only minor modifications in provisions they disliked most--the sanctions program, which they said would lead to increased job discrimination against Hispanics, and the streamlining of appeals procedures.

After the vote, Arnold Torres, national executive director of the League of United Latin American Citizens, termed the bill "poor and clearly discriminatory legislation" that was "not immigration reform . . . not a compromise, nor is it honest."

Attorney General William French Smith, in a statement issued after passage, praised the bill as "legislation that conserves our country's heritage as a nation of immigrants while ensuring adequate legal authority to regain control of our borders."

However, Smith termed the House legalization program "over-generous," and called for amendment of unspecified financial provisions in the House version.