The thing wouldn’t mount, either, so I couldn’t drag it to the Trash to eject it. Restarting with the left mouse button down did not work. Restarting with the Eject key held down did not work either.
The only thing that worked for me was opening the Terminal app (it’s in Applications/Utilities) and typing in the following:
drutil tray eject
Then I pressed the Return key and the CD ejected.