The poem you're referring to is "The Little Wooden Shoe" by Eugene Field. It's not about someone sailing away in a wooden shoe, but rather a little girl named Gretchen who loses her wooden shoe.
The poem tells the story of Gretchen's love for her shoe and how she's devastated when it's lost. It's a whimsical and touching poem about childhood loss and the power of imagination.