Turkey’s Parliament on Thursday passed a bill that increases the powers of the national spy agency and strengthens its immunity, a move that critics said would allow Prime Minister Recep Tayyip Erdogan to bolster his control over state institutions. The measure, which requires presidential approval before it becomes a law, would give the National Intelligence Organization, known by the initials of its Turkish name M.I.T., access to information collected by public and private institutions without a court order and would expand its ability to carry out covert operations. Government officials said the changes would make the agency more efficient and provide protections for its personnel. Mr. Erdogan has been tightening his grip on state agencies as his government deals with accusations of corruption and has tried to block or control access to the Internet, Twitter and YouTube. “With this legislation, the M.I.T. is no longer a national intelligence agency but has become the prime minister’s intelligence agency,” said an opposition lawmaker, Sezgin Tanrikulu.