Isaac Newton first published on gravity in "Principia Mathematica," which was released in July, 1687. A section of "Principia Mathematica" called "Discourse concerning Gravity and its Properties," was read to the Royal Society on April 21, 1686, in preparation for the publication of the book.
Although Galileo did the initial work on the concept of gravity, Newton's elucidation of gravity in "Principia Mathematica" resembles the closest understanding of gravity today. Although Newton most certainly conceptualized the notion of gravity prior to the publication of "Principia Mathematica," there is no information beyond the reading of Discourse concerning Gravity, which can provide a greater level of specificity as to exactly when Newton first conceived of gravity.
Newton originally referred to gravity with the Latin word for weight, gravitas. Although folk legend suggests Newton discovered gravity after having an apple fall from a tree onto his head, the reality is more likely that he simply observed the apple falling. Newton's prior invention of calculus led to Newton's discovery of gravity, because calculus provided the mathematical tools to do the kind of calculations a concept of gravity required. Specifically, calculus could be used to find the speed of an object thrown in the air at any moment during the flight.