Waving the rainbow flags of the LGBTQ+ community and the blue, pink and white transgender flag, the marchers made their way through the city holding placards with slogans like "We make love not war" and "Jesus would walk with us".
According to a police spokeswoman around 7,500 people took part.
"It's very difficult to be queer in Poland, so it's nice to find a place where you can be yourself," said 24-year-old Sabina Joeck.
Gay rights are a highly divisive issue in predominantly Catholic Poland, and the country's ruling nationalists have made battling what they term LGBTQ+ "ideology" a key plank of election campaigns in recent years.
Religious conservatives are bitterly opposed to what they say is an ideology bent on undermining the traditional family, while more liberal Poles say such attitudes result in widespread discrimination.
A handful of protesters opposed to the march looked on holding Catholic rosary beads and a banner alleging that the LGBTQ+ "lobby" sought to sexualise children.
"I am not against homosexuals, these are just ordinary people like us," said a protester who gave her name as Margaret. "But I don't want them to get to our children."
Human rights groups reject accusations that teaching about LGBTQ+ issues in schools seeks to sexualise children.
For Nikodem Mrozek, a 40-year-old mathematician who has taken part in the annual march since its inception, attitudes to LGBTQ+ people in Poland are improving, but the community is still demonised by some politicians.
"Society and the mentality (of people) is getting better and better, but the political situation is getting worse and worse," he said, speaking before the march.
(Reporting by Isabella Ronca and Hedy Beloucif in Gdansk, writing by Alan Charlish in Warsaw, Editing by Ros Russell)
By Isabella Ronca and Hedy Beloucif