In the cerebral cortex, sensory information travels along feedforward connections through a hierarchy of areas processing increasingly complex stimulus features1. Hierarchical processing, based solely on feedforward connections, has dominated most theories of sensory processing in neuroscience and computer vision over the past 50 years. These theories, however, have disregarded the existence of anatomically more prominent feedback connections from higher- to lower-order cortical areas1, whose function remains hypothetical. Feedback has been implicated in attention, expectation, and sensory context, but the cellular mechanisms underlying these diverse feedback functions are unknown. Moreover, it is controversial whether feedback modulates response gain or surround suppression (the modulatory influence of sensory context on neuronal responses) in lower-order areas. Here we have performed the first specific inactivation of cortical feedback at millisecond-time resolution, by optogenetically inactivating feedback connections from the secondary (V2) to the primary visual cortex (V1) in primates. Moderate reduction of V2 feedback activity increased RF size and reduced surround suppression in V1, while strongly reducing feedback activity decreased response gain. Our study has identified a small set of fundamental operations as the cellular-level mechanisms of feedback-mediated top down modulations of early sensory processing. These operations allow the visual system to dynamically regulate spatial resolution, by changing RF size, its sensitivity to image features, by changing response gain, and efficiency of coding natural images, by providing surround suppression.