In Star Trek First Contact, Data and Picard come under automatic weapon fire from Lily. Data comments "Captain, I believe I can handle this," and he drops down to Lily's level of the missile silo, taking several close range bullets after landing. The bullets don't faze Data in the slightest, aside from looking at his clothing now riddled with holes.
During the series, however, it is never suggest that Data was bullet proof. There is even a time when he is shot with an arrow, which pierces his body and damages a secondary processor. The arrow not withstanding, if Data had been bullet proof all along then there was more than one occasion when he should not have been held at bay by someone with a gun (The Big Goodbye and Time's Arrow: Part 2, for example).
Is it ever revealed when Data was upgraded to be bullet proof, or if he had been bullet proof all along?