Gaustatoppen is cold, and with an annual average temperature of 4.3 degrees below zero, you should dress accordingly.
Winter weather puts strict requirements on clothing. You should wear warm and windproof clothing, and remember to wear wool on the layer nearest to your skin. The Norwegian Trekking Association (DNT) has created a nice overview list of how to dress properly while hiking in Norwegian mountains in the wintertime.
Even if you take the tramway both ways, it is recommended that you wear sturdy shoes and pack a windproof jacket, warm cap and mittens in your backpack. Don't be fooled by the summer temperature down at the parking lot, because it can be just as cool as on a late autumn day at the top of the mountain.
If you want to take the tramway one way and hike the other, you should bring extra food and drink, a thick sweater, wool underwear, and dry socks. Keep in mind that there is not mobile coverage everywhere and that the temperature affects the duration of the charge on your mobile device's battery. It is, therefore, a good idea to bring a map and compass.
Also, remember that the hiking route is steep, and that it is easier to hike up than down.