Goalkeeper turned goalscorer...

Remarkably, given the free reign that goalkeepers potentially had under the earlier versions of the rules, there are not many instances of goalkeepers scoring goals in the 19th century. In fact, in the pre Football League era, the feat appears to have been unheard of. I have not been able to trace any instances. I get the impression that whereas the goalkeeper was free to use his hands anywhere in his own half, most keepers 'stayed at home' and got rid of the ball as soon as possible in the face of onrushing opponents intent on steamrollering them into the goal along with the ball. 
Football histories usually attribute the first goal scored by a goalkeeper to Manchester City's Charlie Williams. Williams scored for City at Roker Park on 14th April 1900 in a Second Division game that Sunderland won 3-1. Williams' effort is described as being either 'from a long clearance' or 'from a goal kick', beating no less a keeper than Doig. 
A look at the records shows that the feat had been achieved on at least 4 occasions before Williams struck.
The key to custodians getting on to the scoresheet seems to have been the introduction of the penalty kick, although even then it was 6 years before a keeper scored in the Football League.
Richard Gray of Second Division Burton Swifts scored from the penalty mark in a League match against Leicester Fosse on 27.11.97. Fosse won the match at Burton's Peel Croft ground, 3-2. 
Gray scored on the opening day of the following season (03.09.98) as the Swifts went down 6-2 at home  to Small Heath. The records do not show whether this (or any of his subsequent goals) was a penalty kick*.
That season Gray also scored in the FA Cup against the Leicestershire Senior League's Coalville Town on 15.10.98. Swifts won this home tie by 4-1, Gray opening the scoring. 
Gray's next goal came in a Division Two match against Loughborough on 07.01.99 that was drawn 1-1. All of his goals were scored at home.

*14.02.14- Addendum
I have now established from contemporary press reports that Gray's goals against Small Heath and Loughborough were also penalty kicks.