What is the origin of "when the chips are down"?
It seems to have two similar meanings from the same source - your stack of casino chips
1, "a critical time", ie when you put the chips down to make your choice - as in roulette.
2, "when things are bad", ie when your stack of chips are low - you are losing.
Google ngrams only has significant use from the 1940s and it isn't clear which meaning was first.
When the chips are down comes from poker: when all the bets have been made (the betting chips put forward), and all the cards dealt, it's the critical, final moment when the cards are turned over and the winner revealed.
The earliest use I found was from The Toledo News-Bee newspaper of Oct 3, 1932 in a report "New York Completely Outclassed Chicago":
The Yanks have pretty well flattened that theory. When the chips are down a short series is just like any other series to them.
In the same month, there's a variant when the chips were on the table in the Reading Eagle newspaper of Oct 23, 1932 in a sports report called "Navy Battles Tigers To Tie":
That Navy didn't win was due entirely to the fighting; qualities of Princeton's big line, which simply re fused to budge when the chips were on the table.
There's a possible slightly earlier use from the The Sun of Jul 4, 1932, but it's pay-per-view so the date's unconfirmed:
But when the chips went down, Percy Williams, of Canada, a voyager too, by the way, scampered off with the victory in 10 4-5 seconds.
When the chips are down means “the serious or critical moment”.¹ It refers to the finality of throwing down your chips in a poker game. Before you do this, anything you say or do is just bluff or empty words. Your action of throwing down your chips commits you to an actual position. Thus the action of throwing your chips down is the moment when you get serious.