score:10
It sounds like the legend of Robert Bruce and the spider.
Bruce was King of Scots and leading the resistance against King Edward I of England. Things weren't going well, and Bruce was on the run during the winter of 1306–07. Supposedly (according to the most common version of the legend) Bruce hid in a cave on Rathlin Island off the north coast of Ireland.
He watched a spider spinning a web. It tried to link from one part of the cave to another. It tried and failed twice, but each time it began again and finally succeeded on the third attempt. Inspired by the spider, Bruce returned to the fray and inflicted a series of defeats on the English, which led to his eventual victory.
The story also supposedly gives us the maxim:
"If at first you don't succeed, try, try again."