An image gallery is created by using the <gallery> tag in a wiki page. This is nothing more than a nice framing around a bunch of inline images. The images doesn't "belong to" the gallery and an image can appear in any number of galleries.

See the section Help:Images and other uploaded files#Gallery.

See also: mw:Extension:Gallery2wiki.