An old
English nautical phrase which has passed into common
parlance. It's origin lies with the ship's cook, who would literally have to 'scrape the bottom of the
barrel' to make his supplies last to the end of a
voyage.
Nowadays, the phrase is often used to refer to a desperate last resort.