As tjw321 has mentioned, the software that rip your files must adds the gapless tag onto the music so the playback software will know whether it is gapless music or not. I don't know any software that can add gapless to files that already been ripped (unless you go the long way by creating an iso, mount and rerip it with gapless enable), and I am not a Mac user so I can't really offer much help there.
Except in the iTunes-world, there's no such thing as a "gapless tag", at least regarding lossless formats. For mp3 you're sort of right, Lame is the encoder of choice, since it "patches" the last frame of a stream with an end-flag, instead of filling it up with zeroes. But Flac doesn't need such techniques, as proven by countless playback software like foobar2000, squeezebox, rockbox and the FiiO X3 playback routine (although unstable in 2.1, it worked near perfectly in 2.05).