We present velocity-resolved spectroastrometric imaging of the 4.7 μm rovibrational lines of CO gas in protoplanetary disks using the CRIRES high-resolution infrared spectrometer on the Very Large Telescope (VLT). The method as applied to three disks with known dust gaps or inner holes out to 4-45 AU (SR 21, HD 135344B, and TW Hya) achieves an unprecedented spatial resolution of 0.1 -0.5 AU. While one possible gap formation mechanism is dynamical clearing by giant planets, other equally good explanations (stellar companions, grain growth, photo-evaporation) exist. One way of distinguishing between different scenarios is the presence and distribution of gas inside the dust gaps. Keplerian disk models are fit to the spectroastrometric position-velocity curves to derive geometrical parameters of the molecular gas. We determine the position angles and inclinations of the inner disks with accuracies a s good as 1°-2°, as well as the radial extent of the gas emission. Molecular gas is detected well inside the dust gaps in all three disks. The gas emission extends to within a radius of 0.5 AU for HD 135344B and to 0.1 AU for TW Hya, supporting partial clearing by a < 1 -10 MJup planetary body as the cause of the observed dust gaps, or removal of the dust by extensive grain coagulation and planetesimal formation. The molecular gas emission in SR 21 appears to be truncated within ∼7 AU, which may be caused by complete dynamical clearing by a more massive companion. We find a smaller inclination angle of the inner disk of TW Hya than that determined for the outer disk, suggestive of a disk warp. We also detect significant azimuthal asymmetries in the SR 21 and HD 135344B inner disks.