The choice of Senator JD Vance as former President Donald J. Trump’s running mate reflected the confidence of a campaign so sure of victory in November that it could look beyond a second Trump term to the legacy of his movement.

But in less than two weeks, Mr. Vance has found himself on the defensive, and his struggles have dented the sense of invulnerability that only a week ago seemed to be the overriding image of the Trump campaign.

A stream of years-old quotes, videos and audio comments unearthed by Democrats and the news media in recent days has threatened to undermine the Trump campaign’s outreach to women, voters of color and the very blue-collar voters to whom Mr. Vance, a first-term Ohio senator, was supposed to appeal.

His past comments deriding “childless cat ladies,” supporting a “federal response” to stop abortion in Democratic states and promoting a higher tax burden for childless Americans have yielded a chorus of criticism from Democrats. Mr. Vance’s fresh efforts to explain them have provided Democrats more material, with the Harris campaign promoting one short clip in which he seems to suggest that when he spoke of childless cat ladies, he meant no insult to cats — “I’ve got nothing against cats,” he said.

And his first handful of appearances on the stump have drawn unflattering attention. During an appearance in his hometown, Middletown, Ohio, he tried to explain how his critics would call his drinking Diet Mountain Dew racist, with an awkward aside assuring the audience that Diet Mountain Dew was good.

Mr. Vance’s stumbles have come after a remarkable two weeks when Mr. Trump survived an assassination attempt, and then rallied the party — and even some skeptics — behind him. The Republican National Convention began with calls for national unity, and though those calls were at times undercut by the Republican presidential nominee, the ticket vaulted out of Milwaukee with a head of steam and an expanded lead in the polls.