According to https://en.wikipedia.org/wiki/Help:Gallery_tag the gallery tag supports various parameters that are ignored on mobile.
These parameters add classes such as .mw-gallery-nolines
I'm not sure where the gallery code resides but this patch will be a good first step:
Change-Id: Iee44632292b89dd2f131d529740e8e6f3306cbda
Version: unspecified
Severity: enhancement