Something barely there is hardly there at all. So a barely dressed person is nearly naked.
Barely is a word meaning hardly, nearly, scarcely, or marginally. If there is barely a dusting of snow, there is hardly any snow at all. If your team barely won a game, then they came really close to losing. A person who is barely dressed is scantily dressed: hardly dressed at all. If you barely missed an ice cream truck, then you missed it by seconds. This is a word for near misses and close calls.