1. A prostitute. The phrase derives from the blue gowns that convicted prostitutes once had to wear in houses of correction. Those poor blue gowns will have nowhere to turn when they're released, and most likely will end up here again.
2. A licensed beggar in Scotland (who traditionally wore a blue gown). If you don't take this job, you're going to end up a blue gown, begging on the streets!