TAIPEI—Millions of Taiwanese headed to the polls in an election where a victory for the president would deliver a rebuke to China’s efforts to gain control over the island democracy.

President Tsai Ing-wen, whose party advocates a distinct Taiwanese identity separate from China, staked her re-election bid ahead of Saturday’s vote on a pitch to reduce Taiwan’s vulnerability to economic and political pressure from Beijing, which claims the self-ruling island as its territory.

...