  Observations of the effect of microlensing in gravitationally lensed quasars
can be used to study the structure of active galactic nuclei on distance scales
down to the sizes of the supermassive black holes powering source activity. We
search for the microlensing in the signal from a gravitationally lensed blazar
B0218+357 in very-high-energy gamma-ray band. We combine observations of a
bright flare of the source in 2014 with Fermi/LAT and MAGIC telescopes in
0.1-100 GeV energy range. Using the time-delayed leading and trailing signals
from two gravitationally lensed images of the source, we measure magnification
factor at the moment of the flare. We use the scaling of the maximal
magnification factor with the source size to constrain the size of gamma-ray
emission region in the entire 0.1-100 GeV energy range. The magnification
factor in the very-high-energy band derived from a comparison of Fermi/LAT and
MAGIC data is $\mu_{VHE} = 36^{+40}_{-26}$, substantially larger than that in
the radio band. This suggests that one of the source images is strongly
affected by microlensing at the moment of the flare. Assuming that the
microlensing is produced by a stellar mass object in the lens galaxy, we
constrain the size of the emission region in the $E>100$ GeV band to be
$\mathrm{R_{VHE} = 2.2^{+27}_{-1.7} \times 10^{13}~cm}$. We note that the
spectrum of the microlensed source was unusually hard at the moment of the
flare and speculate that this hardening may be due to the energy dependent
microlensing effect. This interpretation suggests that the source size
decreases with energy in 0.1-100 GeV energy range studied.
