Goldman is trying to achieve an account of knowledge that does not fall prey to simple Gettier cases. In such cases, the subject has a justified belief in some proposition, and it is true, but only by luck - there is a disconnect between the facts that ground the truth of the proposition and the reason for believing it. Goldman tries to capture this disconnect by saying that in such cases there is no appropriate causal connection between the facts and the belief.
In the barn example that you mention, the farmer can see what he takes to be a barn, and is normally perfectly capable of identifying a barn when he sees one, so he has a justified belief that there is a barn in the field. As it happens, what he can see is just a facade, but there is a real barn hidden from his sight in a hollow. The farmer's belief that there is a barn in the field is true, but it is not knowledge. Goldman says this is because his belief is caused by the facade, not by the real barn, i.e. light coming from the facade into his eyes is the cause of his belief, while the barn, which grounds the truth of the proposition, is having no causal influence on the farmer.
As you note, Goldman abandoned this account, because it fails to work for more complex cases, such as where there are lots of barns visible to the farmer; he points at one and says, I know that is a barn; but unbeknown to him, nearly all the items he can see are merely facades, though by luck, the one he points to is a genuine one. Here, the causal account would say the farmer knows this is a barn, because his belief is caused by the light coming from the real barn. But it fails to be knowledge because we don't count belief as knowledge if there is a large element of luck involved. Capturing the meaning of 'luck' here is tricky, which is why there are plenty of different attempts to explain knowledge in terms of reliability, or counterfactual tracking, or the absence of defeating conditions, etc.