How to delete a gap in an After Effects timeline
There's a script that does it for you (I just wrote it). You can get it (free, open source, WTFPL license) here on my blog. With the playhead in a gap, run the script and it will pull the layers after the gap along so the gap disappears. 

BTW all care, no responsibility. It works on my machine, but I've tested it like, twice. Save before using.