to come back from death's door (idiom) / unexpected rescue from danger / fig. to recover from a seemingly impossible situation / to find a way out of a predicament
绝处逢生
jué chù féng shēng
to find a way to survive when everything seems hopeless (idiom)