A version of this is well known:

> Let $X\subset \Bbb R^3$ be a compact
> set and suppose every intersection of
> $X$ by a plane is contractible. Then
> $X$ is convex.

This is due to Schreier (1933) in $\Bbb R^3$, and Aumann (1936) generalized this to higher dimensions.  See this and other related results in Ju.D. Burago and V.A. Zalgaller, [Sufficient criteria of convexity][1], *J. Math. Sci.* **10** (1978), 395–435.  Incidentally, this a (hard) exercise in my book [Lectures on Discrete and Polyhedral Geometry][2] (Exc. 1.25). 

  [1]: https://doi.org/10.1007/BF01476847 "zbMATH review at https://zbmath.org/?q=an:0389.52001"
  [2]: https://www.math.ucla.edu/~pak/geompol8.pdf