The theory of relativity was developed by the renowned physicist Albert Einstein. Albert Einstein formulated the theory of relativity in the early 20th century. In 1905, he published the special theory of relativity, which revolutionized our understanding of space, time, and motion. Later, in 1915, he published the general theory of relativity, which extended the principles of the special theory to include the effects of gravity. Einstein's work on relativity has had a profound impact on the field of physics and has significantly shaped our understanding of the universe.