This happened to my parents cat when she was a kitten. She kept climbing up higher and higher in their tree and wouldn't come down. My mom called animal control or the Humane Society, I forget which one, and they said to just let her stay up there and she'll eventually come down by herself. It took a while but she did eventually come down and never climbed that tree again. It was a big pine tree so she had sap all over her and some of her whiskers were missing.