I was surprised I beat it by one, but I figured out exactly why.
First, you need the correct Genesis version of Sonic 1 - the Japanese version, as opposed to the American version. You can get it at Sonic Stuff. You can tell if it's the Japanese version by the level select since the zones are in order on the list.
Then you just need to watch the .giz X)