William Shakespeare's biggest inspirations were the works of other phenomenal medieval writers, such as Publius Ovidius Naso, Lucius Annaeus Seneca, and Geoffrey Chaucer. Apart from classical authors, he was also greatly influenced by great English historians, such as Raphael Holinshed.
Shakespeare used to read different plays and stories to get ideas while writing his own plays. Plutarch and Chaucer were two of his favorite authors. Chaucer's famous poem "Troilus and Chriseyde" was the main source of Shakespeare's play "Troilus and Cressida." Shakespeare is also known for using biblical imagery throughout his plays and referenced passages of Bible, so it is safe to say that he was very much influenced by the Bible as well.