Gatsby was in the car but his girlfriend was driving while emotionally distraught. It was actually Gatsbys car but Gatsbys girlfriend's husband Tom had made his mistress think it was his car to impress her and make her husband feel bad. The mistress thought the car coming was Tom coming to pick her up to run away together so she ran out in the road and was hit. The husband of the mistress went crazy and was made to think by Tom that it was Gatsby driving and having an affair with his wife and not him. So the husband walked over and shot Gatsby as he was finally using his swimming pool. Bit confusing haha