Low car, gate is closing with some velocity, car has velocity in the other direction, and just really bad timing. The end of the gate probably came through the window.
I am a little surprised the gate doesn't have a lock open mechanism or chain, I think that's pretty common on most gates I see like that. It's certainly tragic for the poor guy. I do note that Ben's article says they were going to ask for $270M and Mech's article says they got $10M. So there wasn't a whole ton of sympathy in the court.