Maybe but very unlikely as that estimate is dependent upon the what data you are using to make the estimate. Based upon newer data that number is likely invalid though.
The United States Census Bureau can help us in answering this question as they provide a break out of data on same-sex couples. In the 2010 ACS Brief on Same-sex couple households reported that nationwide, 115,064 same-sex couple households of which 94,627 households had only their own biological children present.
While interesting this does not furnish us with definitive information. This is where the Supplemental Tables from the 2010 Census come into play. Here we find the following data for California:
2010 Census summary file counts
Male householder: 64,625
Same-sex unmarried partner: 39,901
With own children under 18 years 2,504
No own children under 18 years 37,397
Reported same-sex spouse: 24,724
With own children under 18 years 7,812
No own children under 18 years 16,912
Female householder: 60,891
Same-sex unmarried partner: 34,159
With own children under 18 years 7,121
No own children under 18 years 27,038
Reported same-sex spouse: 26,732
With own children under 18 years 10,392
No own children under 18 years 16,340
Which gives us a total of 27,829 same-sex households in California with their own biological children present.
This raises a problem though since 27,829 is less than the 40,000 claimed. However you will note that this is being reported as households which implies that there are at least three people present (both spouses plus at least one child). In this case we can get a fair estimate of how many children there are by finding out the average children per household. Here I had to use Families and Living Arrangements data from 2010 where California is listed as having an average of 1.95 children per household which now gives us an estimate of 54,266.6 children in same-sex households.
This number leaves us in an awkward situation though because we have a fairly wide range of 27,829 to 54,266.6 children that are in same sex households. If we split that down the middle we end up with 41,047.8 which is close enough to the claimed 40,000 that I would speculate is how that number came about. If we wanted to be strict about the numbers than 27,829 would be the safest number o use; however, it is reasonable to assume that some of those households will contain more than one child.
On 27 September 2011 released a report which called into question the results of the 2010 Census and thus the data reported there in. In the report it was found that as many as 28% of the same-sex couple households are likely to be opposite-sex households. The report indicates that that the form design for the 2010 Census is likely to blame for some invalid data collection.
This means that the 2010 American Community Survey is being recommended for use as a source of data instead of the original 2010 Census data. The updated figures look like the following for California:
American Community Survey 2010 estimates tabulated as reported
Male householder: 47,691
Same-sex unmarried partner: 33,115
With own children under 18 years 1,383
No own children under 18 years 31,732
Reported same-sex spouse: 14,576
With own children under 18 years 2,231
No own children under 18 years 12,345
Female householder: 42,332
Same-sex unmarried partner: 28,014
With own children under 18 years 5,685
No own children under 18 years 22,329
Reported same-sex spouse: 14,318
With own children under 18 years 4,037
No own children under 18 years 10,281
If we add this up we come up with 13,336 households with children and if we use the 1.95 children per household from before that gives us an estimate of 26,005.2 children in same-sex households. This is a substantially lower estimate than the previous high estimate of 54,266.6 children in same-sex households.
Thus, our conclusions are largely driven by the data that we are looking at. While the 40,000 children in same-sex households appears to be an extremely fair estimate based upon the 2010 Census data, when the estimate is updated based upon the revised 2010 American Community Survey data the estimate is quite high. A better estimate using the revised data would be somewhere around 20,000 children in same-sex households.