Choice functions constitute a simple, direct and very general mathematical framework for modelling choice under uncertainty. In particular, they are able to represent the set-valued choices that typically arise from applying decision rules to imprecise-probabilistic uncertainty models. We provide them with a clear interpretation in terms of attitudes towards gambling, borrowing ideas from the theory of sets of desirable gambles, and we use this interpretation to derive a set of basic axioms. We show that these axioms lead to a full-fledged theory of coherent choice functions, which includes a representation in terms of sets of desirable gambles, and a conservative inference method.