Hylaeosaurus was the first ankylosaur discovered.
Until well into the twentieth century its exact affinities would remain uncertain.
In 1978 Coombs assigned it to the Nodosauridae within the Ankylosauria.
This is still a usual classification, Hylaeosaurus being recovered as a basal nodosaurid in most exact cladistic analyses, sometimes more precisely as a member of the Polacanthinae, and thus being related to Gastonia and Polacanthus.
However, in the 1990s, the polacanthines were sometimes seen as basal ankylosaurids, because they were mistakenly believed to have small tail-clubs.
A more popular alternative today is that they formed a Polacanthidae, a basal group outside of the nodosaurids + ankylosaurids clade.

A 2012 study finding Hylaeosaurus to be a basal nodosaurid but not a polacanthine is shown in this cladogram:
Hylaeosaurus was the first ankylosaur discovered. Until well into the twentieth century its exact affinities would remain uncertain. In 1978 Coombs assigned it to the Nodosauridae within the Ankylosauria. This is still a usual classification, Hylaeosaurus being recovered as a basal nodosaurid in most exact cladistic analyses, sometimes more precisely as a member of the Polacanthinae, and thus being related to Gastonia and Polacanthus. However, in the 1990s, the polacanthines were sometimes seen as basal ankylosaurids, because they were mistakenly believed to have small tail-clubs. A more popular alternative today is that they formed a Polacanthidae, a basal group outside of the nodosaurids + ankylosaurids clade.
A 2012 study finding Hylaeosaurus to be a basal nodosaurid but not a polacanthine is shown in this cladogram:
Hylaeosaurus