When you're in danger, it seems likely that you might get hurt. Your mom might warn you that if you don't wear your bicycle helmet, you're in danger of cracking your skull open.
A baby bird teetering on the edge of its nest is in danger, and a driver whose car stalls on railroad tracks is also in danger. When something unpleasant might happen, you can also use the word danger: "We were in danger of running out of guacamole before the party ended." Danger can also be a precarious or perilous place, as when you step up on the curb on a busy street, out of danger.