Anderson's 69-yard score pulled William & Mary within 15-14 midway through the second quarter. His 1-yard plunge before halftime put the Tribe on top for good.
Steve Cluley passed for 145 yards and a touchdown, and rushed for 48 yards and two scores for William & Mary (4-2, 2-1 Colonial Athletic Association).
New Hampshire scored first when Casey DeAndrade returned a punt 90 yards after the Wildcats defense forced a stop on William & Mary's opening possession. Dalton Crossan's 37-yard run and a successful 2-point conversion put New Hampshire up 15-7 before the Tribe scored 27 unanswered points.
Crossan had 109 yards rushing and added six catches for 23 yards for New Hampshire (3-3, 1-1).