The presence of Tea Party candidate Jack Davis, who got 9% of the vote, was a factor but probably not a decisive one. Nate Silver runs the numbers:
Davis ran in the district as a Democrat in 2006, and polls suggested that his voters leaned Republican by roughly a 2-1 margin, but not more than that. If you had split his vote 2-1 in favor of Ms. Corwin, the results would have been Ms. Hochul 51 percent, and Ms. Corwin 48 percent.On average over the past decade this district has gone Republican by a 12% margin, so a 6 point win for the Democrats, or even a 3 point win, is a major shift. That huge surge of support that carried the Republicans to victory in 2010 has already pretty much disappeared, and now polls show the Democrats are back in front on the generic Congressional ballot. So much for their mandate to cut spending.
Meanwhile Republicans in the senate are trying to block Obama's plan to control Medicare spending by filibustering all the nominees for the board that is supposed to limit costs, so as of now nobody's plan to control Medicare costs is going anywhere.