  We demonstrate gravity compensation for an ultracold gas of $^{87}$Rb atoms
with a time-averaged optical potential. The position of a far-off-resonance
beam is temporally modulated with an acousto-optic deflector to efficiently
produce a potential with a linear gradient independent of the atomic magnetic
sublevels. We realize compensation of the gravity sag and preparation of a
degenerate gas in a trap with weak vertical confinement. Optical gravity
compensation will provide the opportunity to perform experiments under
microgravity in a laboratory and broaden the scope of cold atom research.
