Mrs. Clinton has marched in the parade before, participating as far back as 2000 during her run for the United States Senate. Her appearance on Sunday came as her Republican opponent, Donald J. Trump, continues to make the case that he is the true champion of gay rights in the presidential race.

In the wake of the Orlando shooting, Mr. Trump has said he is the candidate most able to keep gay and lesbian Americans safe from hate crimes.

While Mrs. Clinton remains likely to command the vast majority of support from gay voters, she has had a complicated history with gay rights.

As secretary of state, she focused often on international gay rights, urging countries to accept gays and lesbians during a 2011 speech in Geneva. She has since denounced Russia’s treatment of lesbians, gay men, bisexuals and transgender people, and in March 2013, she endorsed same-sex marriage both “personally and as a matter of policy and law.”

But while much of Mrs. Clinton’s donor base includes gay and lesbian supporters, some have questioned the deliberate pace of her evolution. There are also old wounds from her husband’s administration, which enacted the military policy of “Don’t Ask, Don’t Tell” and the Defense of Marriage Act barring federal recognition of same-sex marriages.

Mrs. Clinton inspired fresh criticism this year after the death of Nancy Reagan, mistakenly praising Mrs. Reagan’s “low-key advocacy” concerning H.I.V./AIDS despite the Reagans’ lengthy public silence on the disease. Mrs. Clinton quickly apologized.

The crowd on Sunday included a handful of skeptics.

“She did it strictly so that we would relate the image of her with the image of pride,” said Lexi Avidani, 24, from Long Island. “And she doesn’t support it.”