There are multiple different types of meaning. In regards to literature, meaning can be literal or figurative. The literary meaning of something tends to refer to the figurative meaning behind the writing, style, content, or form of a piece of literature.
Literal meaning refers to the denotative meaning (or dictionary meaning). Literary meaning is a little more involved. A literary meaning can refer to connotative meaning (emotion words elicit in the reader), figurative meaning (meaning established through representations, comparisons, contrasts, metaphorical meanings, allusions, allegories, or symbolism (to name a few)).
Some literal meanings tend to exist because of a misunderstanding.
For example, "Include your grandchildren when cooking bread." Literally, this could be interpreted to mean two very different things. First, one should invite grandchildren to make bread with them. Second, one should use grandchildren as an ingredient in bread. The literal meaning becomes confusing given it can be read in two ways. In literary terms, one would use the other sentences around the sentence in question to determine literary meaning. If the story was a "spin-off" of Hansel and Gretel," eating children would make sense.
A line from Macbeth illustrates this idea as well. "Macbeth doth murder sleep." In a literal sense, one pictures Macbeth with a knife (or any weapon) leaning over sleep and murdering it. Literally, this does not sense. Figuratively, Macbeth murdering sleep refers to the idea that he will not be able to sleep again.