Stanley Kubrick's extraordinary last testament, Eyes Wide Shut, has effortlessly attained one of the criteria of a certain type of classic. It is sui generis in modern Anglophone cinema: in a genre, if not a league, of its own, this genre being best described as Manhattan porn gothic. It has left the global critical community (which has been allowed to view it much earlier and on more generous terms than if the master were still alive) uneasily aware of the possibility that it is not a masterpiece, but rather a grotesque, preposterous flop that embarrassingly damages one of the most unimpeachable reputations in world cinema.

However, it is the very preposterousness of Eyes Wide Shut which is the key to the achievement it represents: it has a singular excessiveness - at once gamey, florid and enigmatically deadpan - which underpins this picture's rich, sensuous style. From the very first frames, Kubrick's imperious command of his material is evident. It shimmers with weird self-possession; it is radioactive with suppressed pornographic creepiness. And the batsqueak of hysteria and absurdity is essential to this fable of erotic paranoia and erotic discontent within the bourgeois marriage.

The principals are WASP and wealthy: Dr Bill Harford and his exquisite wife, Alice, (Cruise and Kidman), whom we see preparing to go out to a spiffy Manhattan Christmas party. Once there, Alice has a little too much champagne: evidently too much to mind her husband flirting with two British models, while she is herself close dancing with an elegantly groomed, silver-haired Hungarian, who murmurs provocatively, in an outrageous accent: "Did you ever read the Latin poet Ovid on the art of love?" Alice smirkingly returns that he died tearful and alone, and it is in this scholarly exchange, and probably this alone, in which the distinctive residual presence of Kubrick's co-writer Frederic Raphael is still detectable.

Later, under the influence of pot kept primly in the bathroom cupboard (more bohemian daring) Dr and Mrs Harford start to argue about sex, and Alice confesses to a fantasy about a young naval officer she glimpsed the previous summer. Enraged yet obscurely excited by this admission, the hitherto entirely faithful Bill embarks on a sexual odyssey in the Manhattan night, culminating in a bizarre masked orgy in a remote country house, presided over by a satanic, robed Master of the Revels.

Eyes Wide Shut is actually very faithful to Arthur Schnitzler's original Viennese novel Traumnovelle, but it loses one of the book's most important features: the implication that the hero and his wife are Jewish. Without that, we do not have the savour of their aspirational qualities; we lose the significance of the hero being jostled in the street, an event which Kubrick reproduces, assigning the role of the aggressors to boorish jocks. Most importantly, we lose some of the socio-sexual aspect of this civilised couple's discontents: the sense of how close sexual rejection is to social exclusion, and the sense that high society is like a thrillingly decadent party to which one is not invited.

Cruise and Kidman are white-bread white folks but their prissy, uptight blandness is something which is all too plausible in this context - in fact, it is debatable how far the actors themselves realised how objectionable Kubrick was occasionally making them appear, particularly with touches such as Tom Cruise's black gloves, fastidiously worn outdoors.

The key moment is, of course, that orgy amidst the plush of a country house, with lots of naked women in masks and thongs swaying and sashaying about in that classy, thoroughbred way essential to a certain pornographic imagination. It is a scene of uproarious Dennis Wheatley-esque extravagance, which Kubrick carries off with a directorial style close to Peter Sasdy, who brought many of the Hammer horror classics to the screen.

Updike wrote that anal penetration was the "black mass" of sexual performance - Kubrick's febrile movie effectively extends this metaphor to all sexual congress: sex is the "black mass" of human relationships, and it is the secrecy and unknowability of the sex act which is at the centre of this picture. And for all Dr and Mrs Harford's pinched and unhappy preoccupation with it, the only sex acts we see occurring are at the orgy. Tom Cruise never has sex with anyone on camera; and he, Nicole, and the audience are finally left, not with the lineaments of gratified desire, nor even post-coital tristesse, but simply an insubstantial impression of some unlocatable, insoluble mystery within the human condition. The couple's final, emotional reconciliation posits an equivalence between actual sexual adventures and those fantasies undertaken in dreams, narratives of sexual transgression which can be simultaneously acknowledged and denied: the significance, perhaps, of that less than euphonious title, Eyes Wide Shut.

Kubrick's last film works only if its satirical, mischievous quality is fully appreciated; as an essay on the nature of sexuality it is vulgar and pretentious, but taken as a bizarre, hallucinatory black comic fable about married life, it is plausible and enjoyable, particularly given the terrific performance by Sydney Pollack as a worldly, libertine party host. The technical and visual command of this movie is captivating - but it is a minor Kubrick.