What is the origin of trials by jury? Were juries used in Old Testament, Greek, Roman, or Inquisition trials?
The modern jury trial in common law countries (i.e. those with legal systems based upon those of English law) derives from 12th century English practice as it evolved over time in England, and is frozen in time to some extent in U.S. practice, by the nature of the jury trial as an institution at the time that it became a constitutional right in the United States in 1789. The English jury system emerged in the 12th century in the wake of the Norman conquest of 1066 CE, and codified Norman customary law, particularly among its soldiers in courts-martial and had some resemblance to modern courts-martial under the Uniform Code of Military Justice for the United States military such as the notion that you could be judge's only by your peers in rank or your superiors, although it subsequently evolved in English civil practice.
(England also developed in parallel non-jury courts of equity as a division of the tax collection department in England, a set of courts that were merged with courts of law in most places in the U.S. in the 19th century, the remains a distinctive source of U.S. jurisprudence in matters which are decided solely by judges. This short summary also ignores features like the coroners' juries and grand juries of English derived practice.)
The civil jury is now almost extinct in England itself, and in most common law countries other than the U.S., except for a handful of kinds of cases (e.g. defamation, civil fraud, false imprisonment, and eminent domain cases), and in serious criminal cases. Other cases in England are now handled in the first instance by a single judge at the trial court level in most cases. Outside the common law countries, first instance trials in serious cases are usually conducted by a panel of three or five judges, with a lead judge presiding over the conduct of the matter.
Most jury-like systems outside of common law countries are limited to serious criminal matters, and often involve a hybrid of judges and specially selected citizens with exceptional ("blue ribbon") qualifications who deliberate together with the judges. These systems were mostly adopted after World War II in imitation of U.S. and English practice, but some as early as the 15th century in Europe.
The Continental European practices described in an answer by @Geremia, and likewise Greek direct democracy based trial and Sumerian trials come from a tradition that was abandoned no later than the 18th and 19th centuries in Europe as civil codes on the model of the French and German civil codes were adopted, and often much earlier. These practices are not ancestral to the current practice of jury trials in modern legal systems.
Juries were not described as a means of adjudication in the Bible.
In the ancient democratic Greek city-states, some city-states had direct democracy of landed males citizens and those citizens met collectively in town meeting style to address both legislative and judicial matters. The governance practice of Caribbean pirates, or some isolated bands and tribes, of small early New England Puritan communities, and of small revolutionary military units, have some similarities to this kind of practice, all of which were small communities organized on a principle of direct democracy and which arose more or less independently of each other.
Mostly, in the Roman Empire, judges or regulated private arbitrators resolved the matters that were vested in civil and criminal juries today in places that still have them. Some serious matters at times in Rome were decided by quasi-juries in a Greek town meeting like format with hundreds of jurors in a stadium or amphitheater. But this was never a routine means by which justice was metted out.
Inquisitorial trials were a subset of canon law, and canon law is generally carried out by deputized clergy, in a process that was more written than oral, and in that involved active investigation by the judges rather than passive consideration of adversary presented evidence (giving rise to the modern inquisitorial judicial systems common in Continental Europe, Latin America, and much of Asia (where Maoist or Islamic legal systems are not primarily influences).
In Medieval Times, the predominant practice was for decisions to be made by the ranking local feudal lord, or his delegate, and the role of the delegate of a feudal lord is directly ancestral to that of the common law legal system's judges, which is one of the reasons that common law judges have powers such as contempt of court, and immunities from liability not available to judges elsewhere.
Select institutions in the Holy Roman Empire and what is now Germany in the 15th to 19th centuries appear to have been devised in imitation of the English jury system.
Another important safeguard was the custom of submitting the evidence, when it was all assembled, to a very large jury, not chosen at random as our juries are, but picked from among the most respected and learned men in the community—periti et boni viri ["experts and good men"]. This was the practice from the time of Gregory IX on; we find Arnaud summoning a jury of good and expert men in Languedoc, at the very inception of the Holy Office. The number was decided by the Inquisitor, but seems never to have been less than twenty; in one jury at Pamiers, in 1329, there were thirty-five, of whom nine were lawyers; at another there were fifty-one, including twenty lawyers. These “experts” considered the evidence for several days, and then advised the Inquisitor what they thought the sentence should be. He was not bound to follow their recommendations, but in practice usually did so. The jury did not know the names of the accused. This probably led to some injustice, as Vacandard points out; on the other hand, it probably saved some unpopular prisoners from the effects of prejudice or personal animosity. At any rate, the consultation of good and expert men, with all its faults and merits, was the beginning of our modern jury system.