The discovery of the second interstellar object 2I/Borisov on 2019 August 30 raises the question of whether it was ejected recently from a nearby stellar system. Here we compute the asymptotic incoming trajectory of 2I/Borisov, based on both recent and pre-discovery data extending back to December 2018, using a range of force models that account for cometary outgassing. From Gaia DR2 astrometry and radial velocities, we trace back in time the Galactic orbits of 7.4 million stars to look for close encounters with 2I/Borisov. The closest encounter we find took place 910kyr ago with the M0V star Ross 573, at a separation of 0.068pc (90% confidence interval of 0.053-0.09pc) with a relative velocity of 23km/s. This encounter is nine times closer than the closest past encounter identified for the first interstellar object 1I/Oumuamua. Ejection of 2I/Borisov via a three-body encounter in a binary or planetary system is possible, although such a large ejection velocity is unlikely to be obtained and Ross 573 shows no signs of binarity. We also identify and discuss some other recent close encounters, recognizing that if 2I/Borisov is more than about 10Myr old, our search would be unlikely to find its parent system.