Kamala Harris’s attack against Donald Trump came in the context of a growing perception that the Republican nominee was gaining an edge