I had trouble wording the title, but the question was posed by thinking about how “You Keep Me Hanging On” charted first by the (female) Supremes and later by the (male) Vanilla Fudge.
Any other songs appear on the charts sung first by one gender and later by the other?
Well, if you count the Dutch charts, “If Not For You” reached 30 by Bob Dylan, and 11 by Olivia Newton-John. Surprisingly, George Harrison’s version never charted anywhere in the world that I can find - probably because I don’t think it was ever released as a single.
I am not sure how it played, but “You Don’t Bring Me Flowers” was released more or less simultaneously by Neil Diamond and Barbra Streisand. I recall hearing a DJ’s cut of the two solo works into a faux duet. In modern parlance, it went so viral they went back to the studio and recorded it that way. I am pretty sure the duet was high on the charts, and so was Diamond’s… not sure about Barb’s. I don’t know of many cases quite like that one.
“I Think We’re Alone Now.” Tommy James and the Shondells and Tiffany. Both made it to #1, which may be the only example of that you’ll find using this thread’s parameters.
Abraham Martin & John: Dion, Miracles, Moms Mabley
Ain’t That A Shame: Pat Boone, Fats Domino, 4 Seasons
Ain’t Too Proud To Beg: Temptations, Rolling Stones
Alfie: Cher, Dionne Warwick
All By Myself: Eric Carmen, Celine Dion
All Cried Out: Lisa Lisa & Cult Jam, Allure
Along Came Jones: Ray Stevens, Coasters
Always And Forever: Heatwave, Whistle