  The most common progenitors of gamma-ray bursts (GRBs) are massive stars with
strong stellar winds. We show that the GRB blast wave in the wind should emit a
bright GeV flash. It is produced by inverse Compton cooling of the thermal
plasma behind the forward shock wave. The main part of the flash is shaped by
scattering of the prompt MeV radiation (emitted at smaller radii) which streams
through the external blast wave. The inverse-Compton flash is bright due to the
huge e+- enrichment of the external medium. At late times, the blast wave
switches to normal synchrotron-self-Compton cooling. The mechanism is
demonstrated by a detailed transfer simulation. The observed prompt MeV
radiation is taken as an input of the simulation; we use GRB 080916C as an
example. The result reproduces the GeV flash observed by the Fermi telescope.
It explains the delayed onset, the steep rise, the peak flux, the time of the
peak, the long smooth decline, and the spectral slope of GeV emission. The wind
density required to reproduce all these features is typical of Wolf-Rayet
stars. Our simulation predicts strong TeV emission 1 min after the burst
trigger; then a cutoff in the observed high-energy spectrum is expected from
absorption by extragalactic background light. In addition, a bright optical
counterpart of the GeV flash is predicted for plausible values of the magnetic
field; such a double (optical+GeV) flash has been observed in GRB 130427A.
