Anyway, I decided to answer this question by...reading stuff about the Crusades. I read all the Wikipedia pages for the various crusades, and then read a book - Thomas Asbridge's "The Crusades: The Authoritative History of the War for the Holy Land". Given that even these basic histories contain tons of uncertainty, we'll never really know why the Crusades turned out the way they did. But after reading up a bit, here are my takes on the main candidate explanations for why Europe ultimately lost.
Explanation 1: Technological Inferiority
To my surprise, this probably wasn't that big of a deal. From movies, and from reading Mongol history - the Mongols hired lots of Middle Easterners to improve their siege technology in the 1200s - I had thought that the armies of the Seljuk Turks and other Middle Eastern powers would be far in advance of that of Christian Europe. But apparently they were about equal. The Crusaders built a cool modular siege tower during the siege of Jerusalem in the First Crusade, allowing them to quickly move their tower to the other side of the city where defenses weren't ready for them. Also, during the siege of Acre in the Third Crusade, it was the Crusaders under Richard the Lionheart who built catapults of unprecedented size, not Saladin. Also, catapults were mainly used to fling stuff into cities, not to batter down city walls - only with the invention of cannon did big medieval walls become obsolete.
As for the gunpowder thing, it was probably deployed only very late in the Crusades, after the Mongols had already used it against European armies in their aborted invasion of East Europe.
Muslim civilization probably was technologically superior to Christian Europe at the time of the Crusades, but the differences were nowhere near the enormous sorts of disparities that opened up in the world after the Industrial Revolution. The Middle East had better medicine, but medicine just wasn't that great anywhere. The Middle East also had some stuff like lateen sails, which allowed them to sail the Indian Ocean, but their ships weren't big enough to create really huge sea trade with places like China.
Militarily, the Middle Easterners had one important technology that European armies lacked: Horse archers. I have no idea why Europeans didn't use horse archers, but this lack seemed to put them at a consistent disadvantage relative to Central Asian armies in the Middle Ages. The Mongols, especially, used expert large-scale horse archery to run right over every army that fought them in the field, including European armies. In the Crusades, constant skirmishing by Turkish horse archers often kept European armies on the defensive in open battles.
But for some reason, the Seljuk Turks and other Muslim armies just don't seem to have used horse archery as decisively as the Mongols regularly did. Despite being usually outnumbered and often faced with horse archers, Crusader armies won their fair share of battles. In the Third Crusade, Richard the Lionheart beat Saladin every time they fought. In the First Crusade and after, the Crusader armies won several pitched battles. Maybe Mongols had perfected the art of horse archer warfare in a way that others hadn't - after all, they also managed to consistently defeat all of their Central Asian enemies, including Turkish armies, in horse archery warfare.
Anyway, it does not seem like the Muslims of the Middle East stomped the Crusaders using superior technology.
Explanation 2: Political Division
The European Crusaders, and the rulers of the Crusader States, were certainly politically divided. There were tensions between the Crusaders and the Byzantines, through whose territory they often traveled to reach the Middle East - in fact, this eventually led to the Crusaders actually sacking the Byzantine capital and effectively ending that empire's power. There was distinct lack of coordination between Crusader leaders on most of the major crusades. The Crusader States were plagued by secession disputes and backstabbing. Rivalries between the Crusader kings in the Third Crusade were one big reason they eventually abandoned that Crusade to go back to Europe and fight each other.
Obviously, this had a very deleterious effect on Crusader effectiveness. But actually, the Muslim world was just as divided as the Christian one, which dramatically weakened Muslim resistance to the Crusades. The Abbasid-Fatimid division probably allowed the First Crusade to seize Jerusalem in the first place, because Jerusalem was on the boundary between those two rival Muslim powers' territories. The main anti-Crusade leaders, Nur ad-Din and Saladin, spent a lot of their time and effort and resources subduing Muslim Syria and/or Muslim Iraq instead of fighting the Crusaders. Saladin came to power by overthrowing the Fatimids in Egypt and rebelling against his Zangid overlords in Syria. In general, the Muslims of the Middle East seemed to spend only sporadic and occasional effort kicking the Crusaders out of the Levant, and a lot more time fighting one another.
So political division was probably a wash here.
Explanation 3: Geographic Distance
This is certainly a big factor. The Mongols could easily gallop across the plains of Central Asia with their herds of animals, but most medieval armies were limited by expensive transport, crappy ships, and the political fragmentation of intervening territories. It's a long way from northern France to Israel. Crusaders had to either beg for help from the Byzantines (with whom they often fought) or buy ships from the Italian city-states. The history of the Crusades is filled with episodes where Crusade expeditions ended up fighting locals on the way over, or got ambushed, or suffered desertions, or had their leaders accidentally die. What's more, even after the First Crusade succeeded and established the Crusader States, they could only receive an intermittent trickle of European reinforcements. As a result, they were chronically outnumbered by their Muslim neighbors by huge margins.
So geographic distance has to be a factor. In the Middle Ages, unless you were a Central Asian warlord with a mounted army, you just couldn't conquer a very large swathe of territory, because it was so hard to get your army from Point A to Point B.
But after reading the history of the Crusades, I'm actually reasonably convinced that geography was only the second-biggest reason Europe ultimately lost...
My Explanation: Lack of Motivation
When we modern folks think of war, we tend to think of huge, dramatic, to-the-bitter-end conflicts like the World Wars. We think of FDR saying "The American people in their righteous might will win through to absolute victory", or French and German armies dying by the millions in the trenches. But I think that for most of history's wars, the question of "why we fight" was just a lot harder to answer, and subject to constant change.
In the Crusades, this is most clearly illustrated by the Third Crusade. Richard the Lionheart handily defeated the main Muslim leader, Saladin, in a series of battles and sieges. He advanced his army to within a short distance of Jerusalem - and then quit without taking the city. He tried to convince the army to attack Egypt instead, but the troops weren't interested in that. Much of his army deserted and everyone ridiculed him, so he gathered another army and again advanced near to Jerusalem. Saladin's army basically ran away, and Saladin was preparing to surrender the city. But again, Richard quit. He worked out a deal with Saladin and headed back to Europe to fight other Europeans.
This lack of will to fight was also in evidence in the later Crusades. The Fourth Crusaders decided they'd rather attack the Byzantines than the Muslims. Enthusiasm for the Crusades steadily fell after the first two, leading to smaller and smaller European armies. The Crusader States struggled to defend themselves, but European armies seemed far more noncommittal.
Why did Europeans prosecute most of the Crusades in such a lackluster fashion? Asbridge suggests that after the first two Crusades, Europe began transitioning from a deeply religious society to one more concerned with worldly politics. There were still spontaneous outpourings of religiously driven crusading fervor from the general populace - for example, the Children's Crusade - but their enthusiasm wasn't generally matched by experienced military types. Only the First Crusade seems to have resulted from a mass outpouring of religious devotion among people who actually knew how to fight wars and lead armies.
While the First Crusade was led by experienced warlords who seemed to genuinely believe that crusading would expunge their sins, later Crusades were mostly led by kings and other nobles whose main aim seems to have been building their prestige in Europe. Richard the Lionheart was a super-effective military leader, but the places he was really interested in conquering and ruling were England and France.
I also suspect that the territories the religious zealots wanted to take - especially Jerusalem - were just not that economically valuable. Acre, Tyre and other Levantine ports were valuable because of trade, but Jerusalem was basically a symbolic prize surrounded by crappy farmland. It's important to remember that pretty much everyone in the Middle Ages, and certainly every country, was desperately poor and frequently on the edge of starvation (except for Sung China, which was enjoying a golden age). Every war therefore had to have an economic dimension as well as a political one - there were just no surplus resources for ideological conflict.
My hunch that Jerusalem was economically worthless comes from the details of the Crusades themselves. Muslim leaders consistently avoided conquering the Christian Kingdom of Jerusalem, generally focusing their efforts on Syria, Egypt, or Mesopotamia. Richard the Lionheart tried to get his troops to bypass Jerusalem and attack Egypt - which makes economic sense, because Egypt had great riverside farmland and valuable ports. In the Fifth Crusade, the Egyptian Muslim leaders offered to just give Jerusalem to the Crusaders to get them to leave the Muslims alone; the Crusaders said no (and ended up losing on the battlefield). In the Sixth Crusade the Muslim leader actually did just give Jerusalem to the Crusaders (they lost it again later). The troops on both sides of the conflict seem to have been strongly religiously motivated and wanted Jerusalem, but the leaders thought in economic terms and tended not to care about the supposed main objective.
So I think that although geography was a difficult obstacle, if there had really been a long-term point to the Crusades, the Europeans would have put forth a greater effort after the First Crusade. They might not have held Jerusalem forever, but they would have made a much better showing than they did.
The Real Lesson of the Crusades
In fact, despite the incredible wealth of the modern world, I think the question of "Why are we even fighting this war?" still matters crucially. In Vietnam, the U.S. defeated the Viet Cong decisively and could have easily stomped any force North Vietnam threw at us, but we (wisely) decided that there was nothing worth fighting for there. Using massive force of arms to force a country not to go communist when it wants to go communist is just a dead-end objective. We lost the war because not because winning was militarily too difficult, but because there was no such thing as winning.
Iraq was clearly not just a military but also a political victory for the United States - our preferred government still sits in power there, and every opposing army has been crushed. Most people throughout history would label that a "victorious" war, as would Wikipedia. But lots of Americans still think we "lost" in Iraq. My hunch is that what they're really sensing is that there was nothing at all worth fighting for in Iraq (at least up until the appearance of ISIS), and therefore there was no such thing as winning.
The Crusades also bear lessons for modern would-be Crusaders who think the West is locked in an eternal struggle with Islam. They should stop more often to think, in the immortal words of Basil Fawlty: "I mean, what is the bloody point??"