During the Passion Week, the crowd in Jerusalem seems to have had a major swing in opinion. Jesus entered the city to praise and adoration but, by the end of the week, faced a crowd shouting for His crucifixion. Can such a change really happen so quickly?
We must consider first that the people shouting "Hosanna" when Christ arrived were not the residents of Jerusalem. Instead, He rode in the company of pilgrims coming to the city for Passover. Because of the news about Jesus raising Lazarus from the dead and hopes that the Messianic Kingdom would soon begin, these pilgrims took to shouting and praising in their enthusiasm. Singing on the road to Jerusalem was not uncommon, and with their false ideas about a Rome-conquering Messiah, the enthusiasm spilled over into palm branches.
Most of the people in Jerusalem, to put it mildly, disagreed with the "unlearned" rabble from the country. Among these types we find the Pharisees, who urged Jesus to rein in the crowd. When Jesus refused and claimed the rocks would praise Him if the people didn't, their animosity only grew. Between these two opposing currents, Jesus rode into town.
We can envision a Jerusalem packed with outsiders pressing close to hear Jesus answer the challenges of Israel's leaders who came to embarrass Him. But this only incited more anger. Jesus had at least the superficial support of the outsiders, but the insiders—though they feared the temporary crowds—only needed opportunity, which came soon enough.
Thus, when those insiders arrested Jesus and brought Him to trial, the former supporters likely felt intimidated by the authority of the leaders. Supporting someone is much easier when there's a reduced chance of being imprisoned for it (e.g., Peter's denials). And perhaps some of those wrapped up in the enthusiasm for Jesus were just as quickly wrapped up in the fervor against Him.
Not all those who supported Jesus turned against Him. Some, in fact, later wrote the accounts we have today.
Adapted and updated from The Life and Times of Jesus the Messiah by Alfred Edersheim (Book V, Chapter I).