The student, who was also killed, arrived at the school on Wednesday armed with guns believed to belong to his father, a retired police officer, Kahramanmaras provincial governor Mukerrem Unluer said.
The gunman was carrying five firearms and seven magazines.
The victims included a teacher and three students, Unluer said, with at least four of the wounded in serious condition.
The motive of the attack was not immediately known.
The attack came just a day after 16 people, mostly students, were wounded when a former student opened fire at a high school in nearby Sanliurfa province.
The assailant later killed himself.
Until this week, such school shootings were rare in Turkey.
Earlier, media reports said that authorities sent police and ambulances to the school in the Kahramanmaras' Onikisubat district, after gunfire was heard there.
Images from the scene showed at least two people being put into ambulances.
Parents rushed to the school after hearing reports of an armed attack, NTV television reported, adding that police took security measures around the school.