I no longer have it word for word -- need to refresh my memory -- but I memorized a short story that runs about an hour in performance. (Brightly Burning Tiger by <PERSON>), just because I liked the tale and wanted to be able to tell it.
First step is to put it in perspective. A typical non-pop song is three to five minutes. So just in terms of time, this is like learning 12-20 songs. Admittedly, most songs are less dense, so perhaps double that.
True, songs have rhythm and rhyme and repeated phrases and other formalisms which aid in structuring memory... But a good script or story often has strong characters who each have their own "voice", and the author has a particular writing style; combining those with the plot and situation, and there are patterns that affect which words sound "right" at any time, which helps to support the learning process. And I selected this story and it's set of roles because these aspects were clear enough that the tale had stayed with me.
(In fact, actors are taught to "leave the words on the page", and recreate them based on what they think the character would say in that situation... and the effects I've just mentioned help to keep them "on script" without having to remember every word separately. Which is a good thing since it leaves most of heir attention free to play the role.)
Looking at it from another perspective, when I retyped the story for study, it came to 12 single-spaced pages. That also sounds much less overwhelming than an hour of speech. Remember, there's usually plenty of rehearsal time and you don't have to memorize the whole thing at once or immediately.
Rehearse, rehearse, rehearse. As with music, "play through" any mistakes,since you are still building the memories for the rest. Practice makes better. 873
Simply making the time to rehearse is a huge part of the process. My cat at the time way very happy that I was spending an hour most nights sitting with her in my lap, making (mostly) friendly-human noises.
It didn't take very long to get to the point where I could tell the tale in general outline, forgetting details and having to search for my own words in places. The next step was more directed rehearsal, marking up the script to indicate where I was leaving things out or saying them differently than Ms. <PERSON> had.. Practicing those phrases in isolation, like learning a riff on an instrument, helped knock out those errors.
Once I had it, all I had to do was refresh it every so often by telling the story, and I could start fine-tuning voices and timing, and getting my voice keyed up to the proper level of tension at the pivotal points in the story. For quite some time I was practicing this on every long drive, in the shower, and using it as a "bedtime story" for myself. It's quite satisfying, and does feel more like reading it or listening to someone else perform it... Again, that's the "leave the words on the page" effect; the story largely tells itself once started. There is mention in another answer of the "memory palace" technique, and this is much the same; each scene reminds me of the next.
As I say, it's been a while and there are once again places where I know I no longer have the exact words... But I could get back that level of precision relatively quickly if I wanted it; most of it is still there. And that, ultimately was the goal; I wanted to be able to drop into character and tell the story, as faithfully as possible, but while making it my own (as much as the character's differences from me permit).
Humans are much more talented than we usually give ourselves credit for. Skill/talent is half of it, but believing you can do it is the other half. And practice time is the third half :-D 873