Turkey's President Abdullah Gul on Wednesday signed into law a contested bill tightening the government's grip on the judiciary as it grapples to contain the fallout from a major corruption probe.