"Only God Forgives" left many in the auditorium wincing or unable to watch, although some lines sparked unintended laughter.
In one scene, Gosling's character Julian tells his crime boss mother (Scott Thomas) that his brother Billy has raped and killed a 16-year-old girl.
"I'm sure he had his reasons," Scott Thomas replies, unrecognisable in long blond wig, fake eyelashes and garish clothes.
"Drive" director Nicolas Winding Refn's film is one of 20 in the race for the festival's top Palme d'Or prize.
In another scene, Thai actor Vithaya Pansringarm playing an ex-cop on a mission to purge Bangkok of sleaze, pins a man to an armchair with knives and stabs him through the eye.
Even Scott Thomas, better known for playing upper-crust Englishwomen with plummy accents, admitted to queasiness.
Winding Refn, in production notes, says he was keen to see her play a mix of Shakespeare's bloodiest female character and fashion designer Versace.
"This kind of film is really not my thing," she told reporters after the press screening.
"Films where this kind of violence happens I don't enjoy watching."
But she said she had decided to get involved in something she considered "hyper violent and quite disturbing" in order to work with Winding Refn and "play this wild, savage person."
The trouble really begins when Billy's killing of the young prostitute leads to his own murder.
Scott Thomas's character Crystal then arrives to collect the body of her favourite son and demand that Julian avenge his death.
Danish director Winding Refn defended his movie, saying he felt powerless to resist a compulsion to depict violence on screen.
"Art is an act of violence. Art is about penetration. Art is about speaking to our subconscious and our needs at different levels," he said.
The film is his second collaboration with Gosling, who is not in Cannes due to filming commitments.
The actor starred in the equally blood-soaked "Drive" which in 2011 won Winding Refn the best director prize at Cannes.
"I don't think about what I do very much. I approach things very much as a pornographer. It's about what arouses me and certain things turn me on more than others and I can't suppress that need," he said.
"But I surely have a fetish for violent emotions, violent images and I just can't explain where it comes from," he added.