Could making out for so long before having sex make it so I can't keep my erection?

It depends. Some people get more excited and have a better erection and some not , specially if they ejaculate.
Yes it can. If that happens take a break for a while and things may correct themselves. It may seem odd but making out for a long time can almost seem like an orgasm has occurred and that means there is definitely a time factor involved in gaining another erection.