Police reported one of the dead was the gunman, said University of Pittsburgh Medical Center spokesman Paul Wood. It was unclear whether the wounded people were patients, employees or visiting family members, Wood said.
Neighboring buildings were placed on lockdown, police said.
Wood said media reports about a possible second gunman and a hostage situation at the clinic or at UPMC Presbyterian hospital were unfounded.
"There was no hostage situation ever," Wood said. "There was a rumor out there that there was a second gunman. That, we believe, was never true."
The University of Pittsburgh Medical Center said it had received some patients from the shooting but did not say how many or what their conditions were.
The facility, Western Psychiatric Institute and Clinic, is located in the city's Oakland neighborhood, a couple of miles east of downtown, and is affiliated with the University of Pittsburgh Medical Center and one of several affiliated hospitals adjacent to the university campus. Other schools are nearby, including Carnegie Mellon, Carlow and Chatham universities.
Pitt sent out email and text alerts shortly after 2 p.m. to warn people of the shooting.
"An active shooter has been identified at Western Psychiatric Institute. Several injured," the alert said. "Possible second actor in Western Psych. Lockdown recommended until further notice. If safe to do so, tell others of this message."
Lawton Snyder, executive director of Pitt's Eye and Ear Foundation, said he and two other staffers were locked down about a block away, in a building that connects to the clinic. He said it was unnerving.
"Obviously I'm terribly sad for those injured. We're just hoping everybody's OK and things are resolved quickly and that they can apprehend those who are responsible," he said.
Patient Kevin Bonner, who was staying on the building's ninth floor, several floors above the shooting scene, said there was a normal atmosphere there, with patients in the common room listening to music, watching TV, drinking and eating snacks. Bonner said no one at the hospital had told them what was going on.
"They are probably just trying to keep a calm atmosphere," he said.
He said he had been napping and awoke to hear an announcement on the intercom: "Bronze Alert on the first floor."
"I didn't think I was hearing my ears right until I looked out the window" and saw police cars and a sniper, he said.