Shoulder to shoulder, arm in arm and hand in hand, hundreds of thousands of lesbians, gay men and other homosexual rights advocates from across the nation marched past the White House to the Mall yesterday, demanding an end to discrimination based on sexual orientation and appealing for more funds to fight AIDS.

The marchers, including many dying of acquired immune deficiency syndrome, the disease that has so devastated the gay community, staged a spirited, colorful procession down Pennsylvania Avenue NW, held a long afternoon rally near the Capitol and made a somber pilgrimage to a giant quilt unfurled on the Mall at sunrise in memory of the estimated 25,000 who have died of AIDS in the United States. {Story on Page C1.}

At least five AIDS patients attending the rally were taken by ambulance to George Washington University Hospital, where they were treated and released, according to authorities.

Chanting "We're Not Going Back, Gay Rights Now" and "We Are Everywhere, California to Delaware," the demonstrators marched in dozens of contingents and affinity groups, including those composed of AIDS patients, gay college students, gay senior citizens, parents and friends of gays, gay veterans, gay couples and gay rights organizations. Marchers also joined the procession according to geographical regions, with many groups unfurling and marching behind the banners of more than 30 states.

A U.S. Park Police spokesman said that about 200,000 people participated in the march and rally. Leaders of the demonstration, organized as the National March on Washington for Lesbian and Gay Rights, said that about 500,000 gays and their supporters participated. They noted that the front of the march left the staging area at the Ellipse at noon while the end of the procession did not arrive at the rally site on the Mall until well after 3 p.m.

The biggest Mall gathering, according to Park Police, occurred in November 1969 during an antiwar protest sponsored by the Vietnam Moratorium Committee. That crowd was estimated at 600,000.

Yesterday's rally would have astounded Oscar Wilde, the 19th century author and playwright once jailed for engaging in what he called "the love that dare not speak its name."

The signs, T-shirts and banners -- "Biology Is Not Destiny," "Dyke from Ohio," "Get Ready for the Gay 90s," "Let Us Love in Peace," "Teach, Don't Preach," "Condoms, Not Condemnation," and "I Love My Gay and Lesbian Friends" -- said much about the march and its message. The participants, who hailed from Honolulu to Howard County, from Modesto, Calif., to Middleburg, Va., said more.

"We wanted to represent the col- lege and show that there are gay people in Iowa," said Jeanie Rowe, 21, a senior sociology major at Grinnell College who sported a "Kiss Me, I'm Gay" T-shirt. She said 24 gay students at the school had rented two vans and driven 20 hours to be part of the march.

Rowe said the support organization at the college had helped her feel comfortable with her sexuality and enabled her to be more open about her life style.

Jane Cable, a retired nurse from Cleveland, said it had taken her 50 of her 70 years to come out of the closet.

"It was the younger people who spurred me on," said Cable, who marched with a United Church of Christ contingent. "Gay people are more open now, and it's good to see young people out here today. They are open about their life style, and that's something we couldn't do 50 years ago."

During the slow, 20-block procession, marchers lined up 30 abreast behind a phalanx of AIDS patients, many in wheelchairs, and many well-known civil rights, labor, religious, women's rights and gay rights activists whose participation was intended to underscore the human rights aspects of the event.

"We know we're not alone," said Pat Norman, a San Francisco gay rights crusader and one of three national coordinators for the march. "We're here together, and that's the most important thing."

Actress and comedian Whoopi Goldberg marched at the front of the procession, wheeling her friend Jim Manness, who has AIDS.

"This has nothing to do with being gay or straight," said Goldberg, who kissed, embraced and cried with AIDS marchers as they arrived at the Mall. "It's human rights."

Goldberg, who said she has lost 60 friends to AIDS, spoke later at the rally, telling the crowd why she had been moved to participate.

"There are children with AIDS, 8 and 7 years old, 5 and 4 years old, and there are people making it tough for them to enjoy the little bit of life they have had," she said. "Why should they be burned out of their homes in Florida?"

Like many in the crowd, she found fault with President Reagan and Congress and complained that they are not doing enough to help AIDS patients.

"Did Reagan send them a letter of encouragement? No," said Goldberg, referring to the three brothers in Arcadia, Fla., whose home burned down in suspected arson after neighbors found out they had the AIDS virus. "Did he explain that there are some ignorant people out there acting in a frightened way? No," Goldberg continued. "I want to know why he has not said to the children with AIDS, 'I am your president.' "

Democratic presidential candidate Jesse Jackson also addressed the rally, saying that all citizens should have equal protection under the law, regardless of sexual preference. "We can fight AIDS, but not with fear," he said. "We can fight AIDS, but not with meanness, not by turning on each other."

Later, he, too, made a special visit to the nearly 200 AIDS patients at the rally, many of whom cried as he leaned over to touch and talk to them.

Reed V. Tuckson, the District's public health commissioner, grew concerned in the late afternoon as high winds plunged temperatures to below 60. He called the Red Cross and quickly arranged to purchase 50 blankets to help shield the sick and keep them warm. One AIDS "buddy," concerned that his charge was getting too cold, climbed onto the shivering man's lap and wrapped his arms around him.

The march drew supporters all along the route, though a small number of counterprotesters stood in Lafayette Park and shouted at the marchers to "read the Bible."

The signs and chants of the marchers reflected humor and joy as well as anger and sorrow. While one marcher carried a banner saying, "Thank God, I'm Gay," another group chanted, "Two, Four, Six, Eight, All the Mormons Are Not Straight." One sign, carried by two leather-clad demonstrators, said, "Diversity is American," another said: "Our Bedrooms Are None of Your Business, Abolish Sodomy Laws."

Lucile and Melvin Wheatley of Laguna Hills, Calif., members of Parents and Friends of Lesbians and Gays, said they marched for their gay son, who died three years ago of a condition unrelated to AIDS.

Dan Bradley, who headed the Legal Services Corp. during the Carter administration and who now has AIDS, fought to maintain his composure but began crying as he told the marchers what he wants his obituary to say.

"I want it to say that in 1982, after years of struggle and a lifetime of fear, I finally had the courage to say, 'I'm gay and I'm proud. I'm gay and I'm proud.' "

Staff writer Rene Sanchez contributed to this report.