Unfortunately, this is happening to millions of cardholders. Under the new Credit CARD Act rules, issuers must give you 45-days advance written notice of a change in terms and the option to opt-out so you can pay off the balance at the old rates. But as you also note, they may require you to close the account.
Closing an account will affect your credit scores, but how much depends on so many factors that it's impossible to predict how much. FICO has done a couple of studies on consumers who have had their credit limits lowered, and found that for those with high FICO scores, the impact tended to be minimal. But that was lowered limits, not closed accounts.
Take a look at the big picture. How much more will it cost you to pay off your accounts at the higher rates? It may be better just to bite the bullet, opt out, get out of debt, then rebuild your credit. Otherwise you may find yourself unable to pay off the debt the higher rates anyway, and default in the future. Late payments would definitely be worse.
(Please ignore the advice of simply not using the accounts anymore. That will not keep your rates lower the way officially opting out will.)