- Small differences within similar passages: some passages have only slight differences differentiating them. That makes it tricky to know when to play which, and to remember what comes after each.
The best solution to memorizing them is to give them a number matching their order in the piece, and play them right next to one another a few times, after saying the number out loud.
Then call out a number at random, and play the corresponding passage, and repeat, until you can go through all of them automatically. This shouldn't take more than a half hour at most, but it's incredibly efficient.
- Long runs: long runs with no pattern need to be learned backward, from the end to the beginning. Put notes into units, for example any arpeggios, or any successive down or up stepwise motion. Memorizing the units will be easier to remember than memorizing single notes.
You also have to be sure that you are able to sing the line. Unless you can sing a part, you can't play a part.
- Counterpoint: When you're dealing with counterpoint, leave one line out and sing it, while playing the other voices as usual. You can do this at any tempo you'd like, just make sure you go through all the voices.
- Intricate harmonies: Relying only on muscle memory won't be as helpful as taking the time to really grasp the music. The best way to do that is by singing.
Play the chords and sing each note that makes it up, from the bottom up. Then play only the bass and sing the rest of the chord.
Picture from http://tipsforclassicalmusicians.com/2010/10/30/how-can-i-memorize-a-40-minute-piece-of-music/