Hi guys,
I think I have eventually found a solution that's working. For me the problem is only happening on mp3s that I added to my library since updating iTunes around August 2015. For those songs I do the following:
1. Delete from the iTunes library but keep the files.
2. Using a good id3 tag editor (e.g. Kid3) open the file
3. Delete the id3 v1 tag
4. Convert any id3 v2.4 tag to id3 v2.3
5. Convert all id3 v2.3 tags to id3 v2.4 (note: this forces all id3 tags to be rewritten)
6. Add the files to the iTunes library
I've tested so far with about 100 songs and this has resolved the issue for them all. My interpretation of the cause of this bug: something in some id3 tags causes iTunes to improperly calculate gapless playback information about mp3s (maybe it is mp3s encoded on a windows/linux machine being added to OS x iTunes... hard to say without actually seeing iTunes source code). To fix you need to force the id3 tag to be regenerated (steps 2-5) and also force iTunes to recalculate gapless playback info (steps 1 and 6).
Re the above comments: I think it's incredible Apple has left this bug unfixed for as long as they have. Personally it affects a large part of my iTunes library -- everything added in the last 9 months. I think it will be possible to find a program or script to automate the id3 tag fix on the files (if anyone knows one I am all ears!) but since Apple 'automated' calculation of gapless information recently there is currently no way to automate that, you have to delete and re-add.
Let me know if this works for any of you all.
Thanks,
Alex