A woman who accused Donald J. Trump during the presidential race of forcibly kissing her at Trump Tower more than a decade ago won an uncontested Democratic primary on Tuesday for a seat in the Ohio State Legislature.

Three weeks before the 2016 presidential election, Rachel Crooks was among several women who came forward to accuse Mr. Trump of sexual misconduct, detailing how she said he grabbed her in 2005 outside an elevator in his Manhattan building and repeatedly kissed her.

But her story did not have a sizable effect on his campaign, a frustrating development that helped spur Ms. Crooks’s political ambitions.

On Tuesday night, Ms. Crooks took a step closer to becoming the first Trump accuser to hold public office, winning an unopposed Democratic primary for an Ohio House of Representatives seat. She is part of a national surge of female political newcomers this year, in both parties and at all levels, who hope to take leading roles in statehouses and in Washington.