Measure the width of the gap. Purchase a foam caulk backer rod in a width equal to the size of the gap. Cut the backer rod to the length of the gap.
Squeeze a bead of caulk down the length of the backer rod. Push the rod into the gap with the caulk on the back. The caulk glues the rod in place. Press the foam deep into the crack so it doesn't protrude.
Place a bead of caulk along the top and bottom edge of the rod. Smooth the bead with the end of a plastic spoon. Allow the caulk to dry.
Attach a length of painter's tape to the wall along the top edge of the caulked area. Place a second length of tape along the bottom edge.
Cover the backing rod with a wide bead of caulk. Smooth the caulk with the back of the plastic spoon. Allow the caulk to dry completely before removing the tape.