Observations in barrier tests on polymer composites with flake-like nanoparticles demonstrate one-step and two-step experimental dependencies of penetrant diffusivity on volume fraction of filler. Conventional models describe the one-step monotonic reduction in the effective diffusivity, but fail to predict the two-step decay. A model is developed for the effective diffusivity of polymer nanocomposites that takes into account clustering of nanoparticles induced by an increase in their content. An advantage of the model is that it (i) predicts both one-step and two-step experimental diagrams in an unified manner, and (ii) involves only two adjustable parameters with transparent physical meaning. The model is applied to the analysis of barrier properties of composites loaded with layered silicate clays, graphene, graphene oxide and reduced graphene oxide, boron nitride and molybdenum disulfide. Good agreement is shown between the experimental data and results of simulation. The influence of polymer matrices, types and chemical modifications of nanoparticles and preparation conditions on aggregation of filler is studied numerically.