Someone's luck has run out and they are close to failure.
Chips refer to gaming chips or tokens. Someone who loses their chips could well be ruined.
Alternative: In the old naval dockyards, the off cuts of pieces of timber (chips) were regarded as legitimate perks for the workers. They took them home and used them; some say that even the woodwork of whole houses was so built. This privilege could be revoked by the foreman or boss, in which case the individual had had his chips.