I think I need to choose either Warsaw or Torun. Which should I choose?
They offer very different experiences - Warsaw is a massive, bustling, largely modern national capitol, while Torun is going to be smaller and older. For a limited visit, you may find Torun to be more of the same after Gdansk and Krakow.
But from a practical standpoint, you only have three full days in Gdansk. If you intend to visit both the WWII museum and the Solidarity Center, it takes a good amount of time to do them justice. Then there is the amount of travel time involved in getting to Krakow. If the more direct route goes through Torun, does that give you time for a quick stopover? You could also route through Warsaw, but you may not have much more time than to step out to the street and view the massive Palace of Culture and Science next door. Looking at train schedules might help with your decision.
For Warsaw, it might be best to subtract a night from Gdansk - it would give you quite a contrast from the other two towns.