I can think of the obvious Star Wars but after that I am stumped. Anyone else have an earlier example?
Edited due to question being deemed too broad.
Earlier epics maybe had less obvious distinctions between heroes and foes. However, the theme of members of a family fighting each others is as old as storytelling itself.
In the case of Hamlet the antagonists are the mother and uncle (and future step-father) of the protagonist.
Going (much) further back, Oedipus’ antagonist is his father who abandons him in the woods due to a prophecy that his son would kill him (which turns out to be self-fulfilling).
In the same vein, many stories of the Greek mythology pit gods against titans, with whom they are related, and the gods also quarrel often within themselves.
dlanod's Biblical answer probably takes it, but Malory's Morte d'Arthur (first published 1485 and possibly based on older French stories) ends with King Arthur and his illegitimate son Mordred killing each other at the Battle of Camlann Field.
As a film trope it dates all the way back, at least, to Metropolis (1927). The hero is definitely Freder, and the villains of the movie include Joh, his father (along with Rotwang, his conspiracist).
Joh sends thugs to track his son and attack his associates, plots to kidnap Maria, deploys fake Maria and encourages the workers to riot so that he can suppress them more fully afterwards.
Both Dune and Star Wars are, more or less explicitly, retellings of the basic "hero myth" identified by Joseph Campbell in his book The Hero with a Thousand Faces. In that book Campbell noted the standard stages that a mythical hero always tends to go through: the call to adventure and initial refusal, the trials, the temptation, etc. (See the Wikipedia article on Monomyth for more details.)
One of those stages is called "Atonement with the Father", when the hero confronts the father/father figure. In Star Wars, this is obviously the confrontation between Luke and Darth Vader: it's less clear in Dune, but is definitely present in the confrontation between Paul and Baron Harkonnen.
If we're looking for the earliest sci-fi/fantasy film, I suggest that this will depend greatly on what you mean by a "family link". Speculative fiction typically pushes the envelope on many different aspects of life, including familial relations. For example:
If you do not consider these cases of 'family', then I agree with dlanod above, and Fritz Lang's Metropolis (1927) would be the earliest.