The story
Coined by Paul Ehrenfest in 1911 in German. Ultraviolet represents that end of the spectrum, given that the visible spectrum represents a stand-in for the whole electromagnetic spectrum, and infrared and ultraviolet are stand-ins for the endpoints. This usage is similar to that represented by the logic behind the terms "redshift" and "blueshift", which assume endpoints of red and blue.
Etymology from Wiktionary, CC BY-SA 4.0.