Before April 1945, Danzig was a city that was controlled by different countries at different times.
First, Danzig was a part of Germany. But after World War I, it was made into a "free city" controlled by the League of Nations, which was like a big club of countries that tried to keep peace in the world.
Then, during World War II, Germany came back and took control of Danzig again.
But in April 1945, the war was almost over and Germany was losing. So the Soviet Union came and took control of Danzig until later when it became a part of Poland.