Constraining the spatial and thermal structure of the gaseous component of circumstellar disks is crucial to understand star and planet formation. Models predict that the [Ne II] line at 12.81 {mu}m detected in young stellar objects with Spitzer traces disk gas and its response to high energy radiation, but such [Ne II] emission may also originate in shocks within powerful outflows. To distinguish between these potential origins for mid-infrared [Ne II] emission and to constrain disk models, we observed 32 young stellar objects using the high resolution (R~30000) mid-infrared spectrograph VISIR at the VLT. We detected the 12.81 {mu}m [Ne II] line in 12 objects, tripling the number of detections of this line in young stellar objects with high spatial and spectral resolution spectrographs. We obtain the following main results: a) In Class I objects the [Ne II] emission observed from Spitzer is mainly due to gas at a distance of more than 20-40 AU from the star, where neon is, most likely, ionized by shocks due to protostellar outflows. b) In transition and pre-transition disks, most of the emission is confined to the inner disk, within 20-40 AU from the central star. c) Detailed analysis of line profiles indicates that, in transition and pre-transition disks, the line is slightly blue-shifted (2-12 km s{^-1}) with respect to the stellar velocity, and the line width is directly correlated with the disk inclination, as expected if the emission is due to a disk wind. d) Models of EUV/X-ray irradiated disks reproduce well the observed relation between the line width and the disk inclination, but underestimate the blue-shift of the line.