The Wellmen held a 3 goal lead at half time following a great strike by Sam Jones, a Paul Williams penalty and a Tom McElmeel header.
But Llanberis fought back and Marcus Orlick reduced the arrears early in the first half. David Jones grabbed the visitors a second goal a few minutes later but Town held on to claim all three points in a tense second half.
The win keeps Town 2nd in the league having played 6 games, winning 4 and drawing the other two games. Town face 3rd place Llanfairpwll on Saturday at Halkyn Road.