Gul announced his decision on Twitter and said he agreed to sign it only after officials changed two articles of the legislation, the Wall Street Journal reported.
Parliament approved the law this month. It will give Turkey's communication ministry power over the country's Internet service providers.
The government will be able to deem that content violates a person's privacy or is illegal without a court decision.
Internet providers will also be forced to keep records users' activities for two years and make them available to authorities.
Prime Minister Recep Tayyip Erdogan said the measure will protect privacy, but those opposed to the bill -- including three opposition parties and the European Union -- will curb freedom of speech.
The law also drew criticism online, and many said it endangers Turkey's democracy.
Turks have begun a campaign to unfollow Gul on Twitter, the Journal said.
Susan Sarandon 'very excited' about daughter's pregnancy
Senate Democrats to pull all-nighter on climate change