Tolkien, was not as great a fan of Shakespeare as most people are but the Ents are certainly influenced by Macbeth - he wanted if I remember aright trees that really went to war. Certainly the prophercy that inspires false confidence is a shared feature .... but I don't think the maker of the prophecy (glorfindel) was inspired by the 3 hags