How do I close the gap in a mask inside UV/Image Editor?
You can press Alt+C to Toggle Cyclic, which closes the selected splines. Pressing it again will re-open the mask spline.

This is also found in the Toolshelf (T) in the Mask tab> Mask Tools> Spline section or in the UV/Image Editor header under Mask> Toggle Cyclic.