Eliot Spitzer has gone from cavorting with hookers to hobnobbing with race-baiting political activists.

The former governor, who is leading the polls in the race for city comptroller, toured the Frederick Douglass Houses in Manhattan Valley yesterday in the company of district-leader candidates Thomas Lopez-Pierre and Carmen Quinones.

Spitzer’s campaign aides said Lopez-Pierre invited himself and they didn’t realize who he was — an outcast in upper Manhattan Democratic circles due to his venomous attacks on blacks, Jews, whites and women.

When he ran for the City Council earlier this year, Lopez-Pierre slammed an African-American uptown developer on his Web site as an “Uncle Tom” who “sucks white/Jewish c–t” for backing his white rival.

“You are an Uncle Tom n—-r bitch. It’s n—-r bitches like you that have sold out the black people of Harlem,” Lopez-Pierre said in a diatribe leveled at the developer, Brian Benjamin, who supported front-runner Mark Levine.

Lopez-Pierre referred to Levine as a “white/Jewish candidate” who was trying to “sneak into office like a thief in the night” in a district where blacks and Latinos are in the majority.

Lopez-Pierre, who also made sexually degrading remarks about Jewish women, dropped out of the council race, and is now running for Democratic district leader.

Quinones, his district-leader running mate, resides in the Douglass Houses and has a consulting firm that Spitzer paid to help him round up enough signatures to get on the ballot.

During yesterday’s tour, she characterized Spitzer’s rival, Manhattan Borough President Scott Stringer, as a bigot.

“Stringer is a racist. He doesn’t treat people of color the way he treats his own people,” she later told The Post.

“Stringer is not only a racist. He’s a womanizer. He treats women differently,” she said, without providing specifics.

Quinones ended up planting a lipstick-smeared kiss on Spitzer, whom she said she invited to discuss his ideas for improving public housing.

“That’s your lipstick. I don’t want any questions about this,” quipped Spitzer, who resigned as governor in 2008 after getting caught in a hooker scandal.

Spitzer’s campaign quickly distanced itself from Lopez-Pierre.

“The campaign did not invite him, and Eliot did not know who he was. Of course, Eliot disagrees with those comments,” said Spitzer spokeswoman Lis Smith.

Stringer’s allies said Spitzer should have known better.

“We are horrified that a former governor of this state would stand with two individuals who have engaged in inflammatory rhetoric that is anti-Semitic, racist, homophobic and anti-woman,” said the statement signed by nine legislators including state Sens. Adriano Espaillat, Brad Hoylman and Jose Serrano Jr.

“That Eliot Spitzer would hold a campaign event under the auspices of supporting NYCHA tenants and proudly stand with two people that represent the ugliest side of politics should be deeply troubling to voters. Who Eliot Spitzer chooses to stand with speaks to his character, and the depths he is willing to sink to 20 days before an election.”