As Ivan Lendl's last backhand hit the net cord, Vitas Gerulaitis dropped his racket, threw up his arms and let out a yell of joy. He stood there, drinking in the cheers of the 7,000 jammed into the National Tennis Center's grandstand court, and blew kisses. "I love you," Gerulaitis screamed. "I love you."

"I was just thinking, 'The boy is back,' " Gerulaitis said. "Feeling the crowd behind me in a match like that was just unbelievable."

Today, Gerulaitis, a missing person in tennis for most of 1981, came back to the U.S. Open and played with the daring that once gained him the No. 4 ranking in the world. He needed all of his considerable skill, courage and verve to beat Lendl, the No. 3 seed, 6-3, 6-4, 3-6, 3-6, 6-4, in a 3 1/2-hour tennis masterpiece.

There were other upsets today. Late in the afternoon, unseeded Bruce Manson defeated fifth-seeded Jose Luis Clerc, 6-3, 7-6, 6-3. Manson, who will play Gerulaitis in the quarterfinals, blew four set points in the second set tie breaker, then came up with a reaching backhand volley to get to set point again. Clerc netted a return to drop the set and had little left thereafter in losing to Manson, ranked No. 74.

In a late-night surprise, seventh-seed Gene Mayer pulled up lame and retired from his match with Ramesh Krishnan of India. Mayer, who also dropped out of a first-round match at last year's Open with a pulled hamstring, won the first two sets, 6-4, 6-1, before Krishnan took the third, 7-6, winning the tie breaker, 8 points to 6.

In the women's draw, unseeded Anne Smith beat eighth-seeded Pam Shriver, 6-4, 1-6, 7-5, in a match punctuated by Shriver's arguments with officials. Smith, with a consistent, probing serve and volley game, meets Martina Navratilova, a 6-2, 6-1 winner over Kathy Jordan, in the quarterfinals.

Top-seeded Chris Evert Lloyd and Hana Mandlikova, both easy winners today, will meet in the quarters. Evert smashed Bettina Bunge, 6-2, 6-0, and Mandlikova eliminated Duk Hee Lee, 6-1, 6-0, in 32 minutes. No. 3 seed Tracy Austin beat Rosemary Casals, 6-1, 6-3. Also in the quarters is Barbara Gerken, 17, who beat Britain's Jo Durie, 7-6, 6-1.

The Cinderella story of 17-year-old Andrea Leand of Brooklandville, Md., ended when she lost tonight to 11th-seeded Barbara Potter, 6-7, 7-6, 6-3.

John McEnroe advanced by beating Kevin Curren of South Africa, 7-5, 6-0, 6-1.

Though the Gerulaitis-Lendl match was played on the grandstand court, not the stadium court, theirs was the best match of the day.

"I decided at the beginning that if he was going to beat me, he was going to have to hit 2,000 passing shots to do it," Gerulaitis said. "He got 1,999 of them."

Although he is ranked third in the world at age 21, Lendl's fortitude has been questioned. The Czech was accused of giving up in a match to Jimmy Connors early this year at the Masters and never has shown a penchant for coming from behind.

Today, none of that was evident. Lendl was facing a player who felt he had something to prove, but a player who is capable of beating anyone in the world except Bjorn Borg.

For 2 1/2 sets, Gerulaitis was almost perfect. He served well, always trying to come in, and volleying with touch and reach.

Gerulaitis broke Lendl in the second game of the match and served out the set. After going down a break in the second set, he came back to win four straight games and the set.

But Lendl hung on, saving five break points in the first game of the third set. When Gerulaitis did break two games later, Lendl broke back, hitting four straight winners for the game.

Treated like a hometown hero for the first time, Gerulaitus appeared unstoppable until, serving at 2-3 in the third, he let a call bother him. It came at 40-0 when he appeared to hit a service winner. But he was called for a foot fault, the only one of the match. While Gerulaitis grumbled and moped, Lendl, seeing an opening, hit five straight brilliant returns to win the game.

Furious, Gerulaitis turned and hit a ball in the direction of the line judge who had called the foot fault. The ball skipped into the stands and hit a spectator and Gerulaitis was fined $750 after the match for his show of temper. Later still, he was fined $500 for skipping the postmatch news conference.

Lendl served out the set. Gerulaitis' attitude had changed and it clearly affected his play throughout the fourth set. It looked as if Lendl would escape.

"I shouldn't have let that call bother me so much," Gerulaitis said. "At the end of the fourth set my coach (Fred Stolle) just told me, 'Dig in and settle down.' So I did, and I got a little lucky."

Both men played their best tennis in the final set, each going for winners, Gerulatis at the net, Lendl at the base line.

In the fifth game, Lendl saved two break points, the first with an overhead, the second with three incredible gets on the same point. Both players now were running down everything and the overflow crowd was cheering every point.

In the seventh game, Lendl was down, 0-40. Gerulaitis went for a winner and hit a forehand too deep. Lendl served an ace and it was 30-40. He came up with another big serve on the next point, but Gerulaitis punched the ball back. Then, Gerulaitis chipped a low return and Lendl, going for the winner, pushed the ball long. Break, Gerulaitis.

Both held serve and Gerulaitis served for the match at 5-4. Quickly, he was in trouble. Lendl hit a forehand winner, then another forehand that Gerulaitis barely touched for 0-30.

Gerulaitis served an ace but then hit a forehand wide and Lendl had two break points. The next point seemed endless, both players hugging the base line. Finally, Lendl netted a forehand and it was 30-40.

Gerulaitis got to deuce with excellent touch on a volley that just caught the corner. Then he came up with a service winner to get to match point. Gerulaitis served, Lendl returned. Back and forth they went. Finally, Gerulaitis chipped and Lendl's backhand just failed to crawl over the tape.

The match was over.

"I went out there with a lot to prove today," Gerulaitis said as he raced to his yellow Rolls Royce. "I knew I could beat him on cement. He doesn't volley that well and he doesn't run as well as me.

"Today, the pressure was on him; before, it's been on me.