The filmmakers went to extraordinary lengths to do things practically and as authentically as possible. Over a dozen of the real "little ships" that helped in the evacuations were used in filming for added authenticity, for instance. But they did have to reckon with the limitations of their medium and the method they had chosen to tell the story. To provide just one example, the German Messerschmitt Bf-109 fighter planes have a distinctive yellow paint scheme on their nose, despite that not being introduced until several months later in 1940. Furthermore, the Messerschmitts are, in fact, Hispano HA-1112s, licensed copies produced by Franco's government.
But there are three reasons for this "inaccuracy" (which I would classify as a nitpick). First, the yellow nose was a concession to the visual nature of cinema as a medium. The filmmakers knew that the audience had to be able to distinguish the German planes from the British immediately, and a bright yellow nose, despite being early by a few months, was the solution. Second, there are very few operational Bf-109s left in the world, and, third, Nolan wanted real planes, really chasing each other on camera. These are completely justifiable reasons related closely to the medium of the story; they're choices by master craftsmen, not errors.
But despite the best efforts of the filmmakers, critical praise, and audience approval, Dunkirk took some flak from historians, including a number I respect. Victor Davis Hanson, after praising the film's many strengths, criticized its lack of strategic context. James Holland nitpicked the film, saying that there wasn't enough smoke and apparently even bringing a stopwatch into the theater to time the Spitfires' machine gun fire. Andrew Roberts, in addition to criticizing the film's "tin ear for the Anglo-French relations of the time," savaged Dunkirk for its
clichéd characterization, almost total lack of dialogue, complete lack of historical context (not even a cameo role for Winston Churchill), a ludicrous subplot in which a company of British soldiers stuck on a sinking boat do not use their Bren guns to defend themselves, problems with continuity (sunny days turn immediately into misty ones as the movie jumps confusingly through time), and Germans breaking into central Dunkirk whereas in fact they were kept outside the perimeter throughout the evacuation.
All three of these historians misread the purpose and the form of Dunkirk.
Again, Nolan conceived of Dunkirk as a survival film, and one that focused on the panic of entrapment. That panic, that claustrophobia, would disappear with the introduction of top-down strategic map-room scenes like those Hanson wishes for and, at worst, reduce the ordinary soldiers of the story to bit players. Compare the soldiers in Dunkirk with the cannon fodder of The Longest Day or A Bridge Too Far if you want to see what I'm talking about. Dunkirk belongs more to the tradition of Saving Private Ryan, a narrowly focused film which, lest we forget, thrusts the viewer immediately into D-day with no opening explanation or context.
Holland, who also praises the movie before getting down to his nitpicks, seems to be bothered by the film's limited scope as well. But this is a limitation of the medium—there just isn't room in one film for 200 destroyers.
Roberts, on the other hand, is difficult to answer. I can only assume he wasn't paying attention to the film and went into it blithely uncurious about its purpose, technique, or artistry. The continuity errors are caused not by carelessness, but by shifts in time across days and hours. The trapped British soldiers don't shoot back because they're hiding and don't want to give away their position. And, in a criticism from later in his review, the little boats aren't evacuating all of the 330,000+ soldiers from Dunkirk, but taking them out to the destroyers to be evacuated. All of this is made abundantly clear by the characters themselves—especially Branagh and D'Arcy's officers on the mole—or by just paying a little attention and taking the film on its own terms.
Dunkirk is a movie, and, as a result, gets some things wrong. But it's a strong film that does perhaps the most difficult job a historical film takes upon itself—putting the viewers into a world that has long since vanished and making them feel what actual people at one time felt. Nolan and his team worked at the peak of their skills in their medium and produced an excellent movie.
More if you're interested
An important book if you're interested in both the film and the history is Dunkirk: The History Behind the Major Motion Picture, by the film's historical adviser, Joshua Levine. Levine offers not just a good short summary of the events leading up to and following Operation Dynamo, but also gives good coverage to the making of the film and Nolan's approach.