A former high school teacher who resigned last fall amid charges that he sexually abused a student was attacked at gunpoint in his Inverness home this week by a relative of the student, authorities said Thursday.