Sorry for the confusion, the shortcode that the original poster above and your shortcode does not really work in the first place. You cannot place a shortcode inside another shortcode, in this case you placed the gallery shortcode inside the button shortcode, it needs to be separated.
Please add your Gallery shortcode on a Raw Content element or Content Area element.
[gallery size="medium" columns="3" link="file" ids="19838,19837,19703,19704,19632,19633,19641,6651,18769,19025,19372,19842,19960,19952"]
Then the button and lightbox shortcode on another Raw element
[x_button shape="square" size="mini" info="none" link="false" href="FIRST IMAGE URL HERE" lightbox="true"]Gallery[/x_button]
[lightbox selector=".gallery-icon a"]
Replace the FIRST IMAGE URL HERE phrase with the actual image that you want to show first.
Hope that helps,