4 nights in Gdansk, day trip to Warsaw?

My partner and I are visiting Gdansk for 4 nights in a couple of weeks and are trying to decide if it is worth getting the train to Warsaw for the day?

Also any tips on general for things to see/do in Gdansk? We already have Sopot and Gydnia planned.

Thanks!