With mpv (and possibly gstreamer, not entirely sure about that) gapless mode works by keeping the audio buffer (which is provided by the sound driver - PulseAudio, ALSA, etc) open between the time when mpv finishes playing one file and starts playing the next. If mpv can open and start reading the next file in the few milliseconds it takes for the sound driver to process the remaining contents of the buffer, you get a gapless transition. If your music library is on a disk that is slow or busy, opening the file might take too long and you get a gap between songs. Precache eliminates disk latency from the equation by ensuring that the next file is loaded into virtual memory (i.e. RAM) before it is time to open it.

This is likely because you have a low memory lock limit set - see here for the explanation. I think the solution will be to edit /etc/security/limits.conf (as root) and set the "memlock" value to something larger (or -1 to remove the limit).