Isaac Newton was about 23 years old when he first developed the key ideas that led to his theory of gravity, during the plague years of 1665–1666.

A small caveat: he did not publish the law of universal gravitation until 1687, when he was 44.