In this work we propose that a disinhibitory circuit motif, which recently gained experimental support, can instantiate flexible routing of information flow along selective pathways in a complex system of cortical areas according to behavioral demands (pathway-specific gating). We developed a network model of pyramidal neurons and three classes of interneurons, with connection probabilities constrained by data. If distinct input pathways cluster on separate dendritic branches of pyramidal neurons, then a pathway can be gated-on by disinhibiting targeted dendrites. We show that this branch-specific disinhibition can be achieved despite dense interneuronal connectivity, even under the assumption of random connections. We found clustering of input pathways on dendrites can emerge through synaptic plasticity regulated by disinhibition. This gating mechanism in a neural circuit is further demonstrated by performing a context-dependent decision-making task. Our findings suggest a microcircuit architecture that harnesses dendritic computation and diverse inhibitory neuron types to subserve cognitive flexibility.