  Aims. We use near-infrared, ground-based data from the VISTA Variables in the
Via Lactea (VVV) survey to indirectly extend the astrometry provided by the
Gaia catalog to objects in heavily-extincted regions towards the Galactic bulge
and plane that are beyond Gaia's reach. Methods. We make use of the
state-of-the-art techniques developed for high-precision astrometry and
photometry with the Hubble Space Telescope to process the VVV data. We employ
empirical, spatially-variable, effective point-spread functions and local
transformations to mitigate the effects of systematic errors, like residual
geometric distortion and image motion, and to improve measurements in crowded
fields and for faint stars. We also anchor our astrometry to the absolute
reference frame of the Gaia Data Release 3. Results. We measure between 20 and
60 times more sources than Gaia in the region surrounding the Galactic center,
obtaining an single-exposure precision of about 12 mas and a proper-motion
precision of better than 1 mas yr$^{-1}$ for bright, unsaturated sources. Our
astrometry provides an extension of Gaia into the Galactic center. We publicly
release the astro-photometric catalogs of the two VVV fields considered in this
work, which contain a total of $\sim$ 3.5 million sources. Our catalogs cover
$\sim$ 3 sq. degrees, about 0.5% of the entire VVV survey area.
