Christine Quinn yesterday won the endorsement of the most famous gay woman in America — but within hours, mayoral rival Anthony Weiner was making his own pitch for gay voters at a well-timed press conference on the Upper East Side.

As Quinn’s campaign was unveiling an ad featuring Edie Windsor — the 84-year-old firebrand plaintiff in the Supreme Court ruling that overturned the Defense of Marriage Act — Weiner was on his way to the New York Blood Bank to call for an end to the FDA’s longtime ban on blood donations by gay men.

Weiner was hardly going out on a limb.

It was just last week that the American Medical Association suggested that the restriction, instituted during the early days of the AIDS epidemic in 1983, was out of date and discriminatory.

Other countries, including Canada and Australia, have already revised their policies.

“I’m Edie Windsor and I want to tell you about another battle that’s very important to me, and that’s getting Christine Quinn elected the next mayor of New York,” she says.

Windsor jumped the gun on the planned endorsement during a celebratory rally Wednesday night outside the Stonewall Inn, the Village landmark where the gay-rights battle began in 1969, and where more than 1,000 people gathered to celebrate the Supreme Court ruling.

As Quinn got up to speak, Windsor hopped on stage and grabbed the mike from her.

“I was committed to not endorsing anyone until there was a decision, but Christine Quinn!” she yelled, clasping Quinn’s hand to raise it in the air.

Quinn said the honor was indescribable:

Quinn said, “To say that she has faith in me to lead this city gives me such confidence to move forward. I’m gonna win this race and make Edie Windsor proud.”

The moment was awkward for Weiner, who stood silently in the crowd, and for Public Advocate Bill de Blasio, a rival who watched from behind the stage.

Both had come out to speak, but changed their minds after hearing all the praise heaped on Quinn.

Weiner then went on to work the Christopher Street bar scene, wearing bright-red pants, a white button-down shirt and a rainbow tie. Asked who picked out his outfit, he offered some insight:

“Here is the gay-straight divide. Straights say I look silly, and gays say I look amazing.

“How do I look?” Weiner asked a gay campaign staffer.

Without missing a beat, the staffer responded, “Well, your pants could be tighter.”