For Democrats demoralized at being shut out of power in Washington, the past several months have offered reason for optimism.