I report on close encounters of stars to the Sun found in the first Gaia data release (GDR1). Combining Gaia astrometry with radial velocities of around 320 000 stars drawn from various catalogues, I integrate orbits in a Galactic potential to identify those stars which come within a few parsecs. Such encounters could influence the solar system, for example through gravitational perturbations of the Oort cloud. 16 stars are found to come within 2 pc (although a few of these have dubious data). This is fewer than were found in a similar study based on Hipparcos data, even though the present study has many more candidates. This is partly because I reject stars with large radial velocity uncertainties (>10 km s−1 ), and partly because of missing stars in GDR1 (especially at the bright end). The closest encounter found is Gl 710, a K dwarf long-known to come close to the Sun in about 1.3 Myr. The Gaia astrometry predict a much closer passage than pre-Gaia estimates, however: just 16 000 AU (90% confidence interval: 10 000–21 000 AU), which will bring this star well within the Oort cloud. Using a simple model for the spatial, velocity, and luminosity distributions of stars, together with an approximation of the observational selection function, I model the incompleteness of this Gaia-based search as a function of the time and distance of closest approach. Applying this to a subset of the observed encounters (excluding duplicates and stars with implausibly large velocities), I estimate the rate of stellar encounters within 5 pc averaged over the past and future 5 Myr to be 545±59 Myr−1 . Assuming a quadratic scaling of the rate within some encounter distance (which my model predicts), this corresponds to 87 ± 9 Myr−1 within 2 pc. A more accurate analysis and assessment will be possible with future Gaia data releases.