Nuclear pore complexes (NPCs) form aqueous conduits in the nuclear envelope and gate the diffusion of large proteins between the cytoplasm and nucleoplasm. NPC proteins (nucleoporins) that contain phenylalanine-glycine motifs in filamentous, natively unfolded domains (FG domains) line the diffusion conduit of the NPC, but their role in the size-selective barrier is unclear. We show that deletion of individual FG domains in yeast relaxes the NPC permeability barrier. At the molecular level, the FG domains of five nucleoporins anchored at the NPC center form a cohesive meshwork of filaments through hydrophobic interactions, which involve phenylalanines in FG motifs and are dispersed by aliphatic alcohols. In contrast, the FG domains of four peripherally anchored nucleoporins are generally noncohesive. The results support a two-gate model of NPC architecture featuring a central diffusion gate formed by a meshwork of cohesive FG nucleoporin filaments and a peripheral gate formed by repulsive FG nucleoporin filaments.