"a natural exclamation" [OED] of surprise at doing something awkward, but attested only from 1933 (cf. whoops).
An exclamation of surprise, dismay, apology, etc, esp when one has done something awkward: Mr Belve, oops, I mean Webb, is ecstatic (1933+)
nounA blunder; serious mistake; goof, whoops: Might have saved her life. Basic oops (1980s+)
verb(also oops up) To vomit; barf (1980s+)
[echoic, fr the involuntary lip-rounding and expulsion of breath that accompany a regrettable mistake, and from an approximation of the sound of vomiting]
"OOPS: A Knowledge Representation Language", D. Vermeir, Proc 19th Intl Hawaii Conf on System Sciences, IEEE (Jan 1986) pp.156-157.