I fixed the problem! For anyone who finds this post, this was the solution:
We had the Smush image optimization plug in installed, as well as WP Rocket. Something between both image optimization plugins was in conflict. When I deactivated Smush, the galleries started working properly.
So if you are experiencing this same issue, I would recommend seeing if you have multiple image optimization plugins and then disabling one of them.