When the Chips Are Down

What does the idiom “When the Chips Are Down” mean?

Definition:

When a situation becomes urgent or difficult

For example:

“Jerry often seems lazy, but when the chips are down you can depend on him to help.”

Notes:

This expression comes from poker, where “chips” are used as tokens.