Fill holes made by the nail gun with wood filler or caulk. Using a scraper, remove excess filler that overflows out of the hole. It's OK if it's not perfect; you'll fix it later.
Let the wood filler or caulk dry. Read the back of the wood filler or caulk to determine the exact drying time.
Sand the wood filler with sandpaper so that it's even with the molding and there's no variation because of the hole.
Paint all of the trim you installed one continuous color. You can use a flat, gloss or semi-gloss paint. Once the paint dries, you'll have continuous trim with no holes in sight.