“My life is a lot better without being in politics,” she said. “I took a year out of my life, put my own money into this and stopped all of my business in order to do this. I only decided to do this when I thought there was a path to victory.”

It can be hard to see where her confidence comes from. Ms. Gillibrand, who has more than $10 million on hand compared to Ms. Farley’s $195,000, leads by at least 25 points in all public polls. Ms. Farley’s name recognition is dismal. When she recently visited a local television studio for an interview, at least one reporter who ran into her beforehand did not recognize her.

Ms. Gillibrand has all but ignored Ms. Farley’s candidacy, barely touching her campaign funds and agreeing to only one debate, which she used largely to focus on Mr. Trump.

The political circumstances of this particular year have further complicated things. Ms. Farley’s advisers acknowledge that Democratic energy around the country, which has thrust once-safely Republican seats into play, has limited the resources that donors and party officials are willing to divert to a long-shot bid like hers. (Still, she has raised nearly 10 times more than the last Republican Senate candidate in New York.)