Is there any scholarly consensus about the origins of organized crime historically? Do movements such as the Ndrangheta have analogues in the pre-Christian or Medieval world? Or is it a relatively new, post-Industrial kind of thing?
There's no good cut-and-dried answer to what 'the origins of organized crime' are, as it is a phenomenon that sprang up in many places independently. I'm not aware of any consensus as to the very first example of an organized criminal group either, although, as DVK points out, you would have to define what you think would qualify as organized crime.
Certainly many criminal organizations that are still functioning today, such as the Ndrangheta you mention, Cosa Nostra, the Yakuza, the Triads, etc. arose in the late 18th and early 19th centuries at least partially in response to the upheaval brought on by modernization/foreign expansion into their home country. Many of these kinds of groups began as rebellions or citizens' vigilante organizations that slowly transformed into protection rackets once whatever threat that prompted their formation had faded. Most of these organizations distinguished themselves (and still do to some extent) by adhering to a strict system of patronage and hierarchy that is based around traditional customs that were falling by the wayside in regular society.
However, groups that operate along similar lines to what we would call organized crime have been commented on as early as 50 BCE . If you're interested in organized crime in the ancient world, the book DVK mentioned, Organised Crime in Antiquity, might be a good place to start.
I'm not sure about consensus, but there are books on the topic. Example:
Further east, Yakuza originated in 1600s.
More controversially, you could view pretty much any feudal lord as an organized criminal (since your question wasn't terribly specific on how you define organized crime). You have a boss with violent enforcers who collects taxes from people in his area.
Definition of organised crime
Using the definition of organised crime from the UK government, I will provide some examples of ancient and prehistoric acts.
In ancient Egypt, not only did we have Piracy from the seas, dating back to Amenhotep III, and possibly before, but we also have a tomb robbery trial during the reign of Ramesses IX which became a national affair and definitely points to ancient conspiring to commit pre-planned and highly organised crime against the state.
Dating back to prehistoric times we have suspected instances of large groups of individuals coming together to wipe out fellow male populations in order to steal their women. This would make today's illegal sex trafficking of prostitutes pale in to insignificance.
Whether or not you consider this to fit the modern day definitions of organised crime, largely depends on your own definition. But definitely the roots of organised acts with criminal intentions were well set in motion the second a group of pre-histporic hunters decided it would be a good idea to massacre the male population of their rival tribe in order to acquire their women.
Organised Crime is defined as planned and co-ordinated criminal behaviour and conduct by people working together on a continuing basis. Their motivation is often, but not always, financial gain. Organised crime in this and other countries recognises neither national borders nor national interests.
Piracy (Before the sea peoples)
According to the National geographic, Piracy in ancient Egypt pre-dated the sea peoples, and one of the earliest instances recorded comes during the reign of Amenhotep III.
Some of the earliest written accounts of piracy come from Egypt. One of the first is an inscription from the reign of Pharaoh Amenhotep III (1390-1353 B.C.) that describes having to establish defences in the Nile Delta against maritime raiders. These raiders were perhaps the first true pirates, as they attacked anyone of any nationality and owed their allegiance to no one.
Apparently there is a Papyrus named the Abbott Papyrus kept at the British museum which dates back to approximately 1100 BC and records the events of a court trial regarding tomb robberies, which i believe would very much fall under your definition of high level organised crime.
The Abbott Papyrus is held and preserved at the British Museum under the number 10221.3 The original owner/finder of the papyrus is unknown, but it was bought in 1857 from Dr. Henry William Charles Abbott of Cairo, hence the name Abbott Papyrus.4
The Abbott Papyrus dates back to the Twentieth Dynasty, around 1100 BC under the reign of Ramesses IX in his 16th year.
Papyrus Mayer A
However, according to translations of Papyrus Mayer A, five of the six accused tomb robbers were on this occasion found "not guilty", which is perhaps not just evidence of the existence of organised crime in Ancient Egypt, but perhaps also evidence of the foundations of a modern court system which practises leniency.
The confessions of the six suspects were corroborated by the testimony of the chief of police of the Theban Necropolis and other witnesses, among them the son of one of the thieves who had died in the meantime. This witness claims to have been a child at the time of the crime; still, he was beaten when he was being examined, as was a female witness.
While the ancient Egyptian judicial system was quite brutal and biased against the accused, a verdict of guilty was not a foregone conclusion: Papyrus Mayer A records the discharge of five men who had been found to be innocent.
Talheim Death Pit
Evidence of violence and acts that would now be considered criminal date back to prehistoric times however, according to ScienceDaily, that reports on men committing horrendous acts of violence against other men as far back as 5000 BC.
Men may usually settle it over a drunken brawl in the pub or perhaps a verbal spat -- but new evidence has shown for the first time that fighting over women in prehistoric times could have been worse than that.
A mass grave of skeletons investigated by Durham University-led researchers suggests that neighbouring tribes from prehistoric times were prepared to brutally kill their male rivals to secure their women.
A similar site to the "Talheim death pit" called Cemetary 117, and dated to approximately 12,340 BC at latest estimate, can be found in Africa.
The site known as Cemetery 117 it is dates from approximately 13,140 to 14,340 years old. It contains 59 skeletons along with many partial skeletons, many with arrowheads or spear points embedded in them, indicating that they may have been the battle casualties. On a 7,500 year old site called the Talheim Death Pit, archaeologists believe a rival tribe was massacred. Approximately 34 people were bound and predominantly killed by a blow to the left temple.
What are the origins of organized crime?
There have been criminal acts committed by humans dating back to prehistoric times, however it would not be until the first law codes are implimented that organised crime became official, and the best date we have for this is around 2030 BC with the Code of Ur Nammu.
In ancient Egypt they had a highly advanced court system in place to deal with criminal acts, like those highlighted in the Abbott Papyrus.
Origin & Definition
Organized Crime originated from non-state organized rebels who are fought back on the basis of violating the law. Piracy is a form of organized crime, the Sea Peoples threatened ships, how can people take down ships unorganized?
Piracy is usually confronted by Military-aided law enforcement, thus making it a criminal organization.
The general definition of organized crime is Criminal organizations that are non-state and violate the law within their country.
Really though, Organized Crime sprang up independently in various places around the globe. There are many organized criminal organizations today, such as the KKK and Antifa.