Only weeks ago, top Democrats appeared to have all but written off a special election for a Congressional seat in the suburbs of Buffalo. After all, Republican voters vastly outnumber Democrats in the district, and the Republican candidate, Jane L. Corwin, a well-liked state assemblywoman, seemed to be a shoo-in.

Then along came Representative Paul D. Ryan of Wisconsin. Mr. Ryan, a top House Republican, released a plan calling for the most extensive overhaul of Medicare since it was created.

That, it seems, has significantly changed the contest in New York’s 26th Congressional District.

After leveling a barrage of attacks against the proposal put forth by Mr. Ryan, the Democratic candidate, Kathy Hochul, has tightened the race considerably, even as her Republican opponent remained supportive of the plan, perhaps out of concern that distancing herself from it would alienate conservatives.

The shifting dynamics of the race, which have emboldened top Democrats and their allies, underscore the intense reaction to Mr. Ryan’s proposal, the centerpiece of a budget that House Republicans voted to approve in April to address the nation’s long-term financial problems.