Just when Americans have largely forgotten about the Treasury's controversial bailout program, the Congressional Budget Office on Tuesday blamed it for an anticipated $23 billion widening in the government's deficit.

The non-partisan CBO, as part of its annual budget outlook, said that the Troubled Asset Relief Program, or TARP, will reverse $37 billion in gains in fiscal year 2011, and instead post a net cost of $23 billion this year.

The net $61 billion swing is due to declines in the value of shares the U.S. Treasury owns in General Motors Co and American International Group .

The government bailed out the automaker and the insurance giant during the height of the 2008-09 financial crisis, leaving U.S. taxpayers with substantial equity stakes in each.

After both firms pulled off successful public stock offerings in 2010 and 2011, their improved valuations made it seem that the government might actually earn an overall profit on TARP.

But since then, the stocks have fallen.

GM, despite a major comeback that has returned its crown as the world's top-selling automaker, has seen its share price slide from $37 a year ago to $24.02 on Tuesday - significantly below the $33 IPO price and far below the approximately $53 price needed for taxpayers to break even.

AIG shares have declined from about $43 in early February of last year to end at $25.11 on Tuesday. The breakeven price for AIG is about $28.73 per share.

The CBO's estimate of TARP outlays represents only about $3 billion in actual cash out the door, for housing rescue expenses. The remaining $20 billion is a non-cash accounting adjustment.

The Treasury's most recent estimate for TARP's net cost to taxpayers, made earlier this month, was $68 billion. The program, initially billed as a $700 billion bailout fund, ultimately invested $411 billion in financial firms and automakers.

The CBO, however, on Tuesday estimated TARP's lifetime costs at $34 billion. One major difference is that Treasury assumes that all $49 billion in TARP housing rescue funds will be spent, while CBO estimates that only a portion of these will be used.

(Reporting by David Lawder, Editing by Gary Crosse)