Selective processing of behaviorally relevant sensory inputs against irrelevant ones is a fundamental cognitive function whose impairment has been implicated in major psychiatric disorders. It is known that the thalamic reticular nucleus (TRN) gates sensory information en route to the cortex, but the underlying mechanisms remain unclear. Here we show in mice that deficiency of the Erbb4 gene in somatostatin-expressing TRN neurons markedly alters behaviors that are dependent on sensory selection. Whereas the performance of the Erbb4-deficient mice in identifying targets from distractors was improved, their ability to switch attention between conflicting sensory cues was impaired. These behavioral changes were mediated by an enhanced cortical drive onto the TRN that promotes the TRN-mediated cortical feedback inhibition of thalamic neurons. Our results uncover a previously unknown role of ErbB4 in regulating cortico-TRN-thalamic circuit function. We propose that ErbB4 sets the sensitivity of the TRN to cortical inputs at levels that can support sensory selection while allowing behavioral flexibility.