To me, a cinematice masterpiece is that rare film in which everything comes together – acting, casting, script, direction, photography, music, plot etc, so that the film is elevated to become something more than it is on paper. Take Casablanca – on paper, this was just another B movie. On the screen, through some alchemical process it became one of cinema’s great love stories. In other words, it transcended its genre. There are many other examples of this throughout film history. The Lord of the Rings trilogy transcended the “sword and sorcery” genre to become something greater. The Godfather (at least films 1 and 2) transcended the gangster film genre to become something greater. Spielberg’s Saving Private Ryan transcended the war film genre. Bresson’s A Man Escaped trancended the prison escape film genre. There is an element of artistic inspiration which cannot be explained logically in which all elements of the film cohere into a unified whole.
I think Carol Reed’s The Third Man is about as close to perfect as a film can get. What was it that enabled Reed to create this masterpiece? Was it the influence of Orson Welles? Or Grahame Greene? Who knows? Because none of Reed’s other films achieved this level of perfection (although Odd Man Out was probably the closest in tone to The Third Man, it doesn’t have that extra indefinable quality that a masterpiece has).
Having said that, there are of course technical masterpieces which may not be perfect. Example: The Cabinet of Dr Caligari is technically a masterpiece for when it was made in 1919 but is primitive in some other areas such as acting. And then there are masterpieces which are of their time but can seem dated now in their attitudes. A prime example of this being David Lean’s Lawrence of Arabia. Great film, yes, but when I saw it at the cinema a few years ago I was struck by how old-fashioned a lot of its views were. The script was showing its age. But I think it is still a masterpiece of epic cinema.
And then we have masterpieces of specific types of films: of surrealism (Bunuel’s Belle de Jour); of propaganda (Riefenstahl’s Triumph of the Will); of politics (Pontecorvo’s The Battle of Algiers); of science fiction (Kubrick’s 2001: A Space Odyssey); of comedy (Keaton’s the General); of satire (Wilder’s Ace in the Hole); of film noir (Hawk’s The Big Sleep) etc. All these films are perfect examples of their genre. They all deserve the term “masterpiece” even though they may not be perfect every aspect (The Big Sleep has many plot-holes, for example).