Wikipedia attributes Leibniz's formula to Madhava of Sangamagrama, James Gregory and Gottfried Leibniz. But what were their proofs?
A good reference for this question is Ranjan Roy: The Discovery of the Series Formula for $\pi$ by Leibniz, Gregory and Nilakantha. Mathematics Magazine, Vol. 63, No. 5, December 1990, pp. 291-306. The article is reprinted in Berggren et al.: Pi: A Source Book.
Gregory did not publish his results on series, but he corresponded with John Collins in London from 1669 until his (Gregory's) death in 1675, and the arctan-formula is contained there. The correspondance was published by Turnbull in 1939.
In the title of his article, Ray has chosen to name Nilakantha rather than Madhava who lived a century earlier. The reason is that we do not have the original text of Madhava; while he is credited by Nilakantha, it is not clear if this also includes the arctan-formula.