The tunnel takes around 15 mins, the pass over an hour. The former is dependent on queues (a really frustrating approach and you mustn't let your car overheat during your stop start manoeuvres), and the latter depends on how much traffic is using the pass.
http://www.gotthard-strassentunnel.c...35.0.html?&L=2 will give you details of any predicted night time closures for the next few weeks.
At the time you intend to set off from Lugano, I suspect you'll have quite a lot of traffic going north, with possible queues and you might need to head up the valley by the village roads to avoid a long wait ...