This is the 1871 census entry that you mention:
http://interactive.ancestry.co.uk/76...nSearchResults
61 Grant Street, Eccleston, Lancashire
William Eccleston Head Mar 59 Gardener Lancashire
Mary Do Wife Mar 47 Do
Elizabeth Do Daur Unm 21 Do
George Do Son Unm 19 Miner Do
Mary Jane Do Daur Unm 13 Do
Beatrice Do Daur 9 Scholar Do
Ann Do Daur 6 Do Do
William Henry Do Son 3 mths Do
and the 1881:
http://interactive.ancestry.co.uk/75...nSearchResults
158 Park Rd, Parr, Lancashire
James Dixon Head Marr 54 Miner St Helens Lanc
Alice Do Wife W(?) 57 Wife " "
John Do Son Unm 21 Miner " "
Hellen Do Daur " 17 " " "
William Eccleston Grand Son " 10 Scoler " "
If he is the illegitimate son of one of the Ecclestons' children (maybe Elizabeth?) then it would not be unusual for the grandparents to put him down as their own son on the census, or indeed to bring him up as their own son, to look respectable.
It looks as though your William married an Ann Grimshaw 14 Nov 1894 at St Paul, Skelmersdale, and the Lancashire Online Parish Clerks website has a transcription of the marriage record which gives details of the bride's father but not the groom's, and this would fit with him being illegitimate.