The gallery columns setting is located in Products > Settings > Catalog Design > Product Page.
The gallery columns setting manages the number of additional images per row for lightbox. It is not available if product slider is enabled.
You can set unlimited number of additional images per row by setting the gallery columns number to zero.