Thousands of Palestinians had gathered to try to get aid from U.N. trucks entering the territory.