Apple - Mac Pro cd drive stuck open

It's likely the case will have to be replaced. I've fixed this before by lightly tapping on the area below the gate, but it's a recurring thing.

You can also slide the optical drive housing out and take a look at the mechanism that raises and lowers the gate. Try manually pulling it up and down a few times.

I got it fixed by inserting a needle in the case’s holes right underneath the lid. Keep pushing it up while holding the lid with a slight press, repeat the process and keep switching the holes all the way up!

EDIT: I made a quick video tutorial for easier explanation.