Precise measurement of the fundamental parameters of stellar systems, including mass and radius, depends critically on how well the stellar distances are known. Astrometry from space provides parallax measurements of unprecented accuracy, from which distances can be derived, initially from the Hipparcos mission, with a further refinement of that analysis provided by van Leeuwen in 2007. The publication of the Gaia DR2 catalogue promises a dramatic improvement in the available data. We have recalculated the dynamical masses of a sample of 1 700 close visual binary stars using Gaia DR2 and compared the results with masses derived from both the original and enhanced Hipparcos data. We show the van Leeuwen analysis yields results close to those of Gaia DR2, but the latter are significantly more accurate. We consider the impact of the Gaia DR2 parallaxes on our understanding of the sample of visual binaries.