The proposal, submitted by East Renfrewshire Council, has been divisive, with 64 letters of support and 63 objections submitted to the planning committee.
Provost Jim Fletcher said an upgrade to the school’s sports field was “desperately needed”.
But councillors did vote to impose a condition which means the facility will have to shut at 7pm from Monday to Friday, as suggested by the school, rather than the 8pm closing time put forward by council officers.
A council officer said the facilities would only be for educational use, including sporting events with other schools, which could be in the early evenings or on Saturday mornings.
Objectors have concerns over the glare from proposed floodlights, increased noise, a loss of privacy, more traffic and inconsiderate parking.
Those in support of the application believe the improvement of the facilities will have exercise and health-related benefits.
Provost Fletcher said: “Mearns Castle has poorer facilities than most of our other high schools, and I think the upgrade is desperately needed.
“Clearly that is recognised by the school community, given the level of support there is for this application.
“I do think we need to keep Mearns Castle at the forefront as one of our premier schools, the children that go there deserve the best facilities that we as a council can give them.”
He was “surprised” by the restriction on opening hours, adding: “I don’t personally see the need to go to 7pm, given other schools are running until 10pm at least.”
However, Cllr Jim Swift suggested the 7pm closing time and his amendment passed by four votes to three.
He said: “There is a significantly greater proximity of houses to these sports facilities than there are in other local facilities. They are literally across the road.”
Cllr Swift added: “As a local elected member, I welcome this. The facilities at Mearns Castle are pretty grim, and are by far and away the worst that we have for any of the high schools.
“I also would like to say that I welcome this is solely for use by the school, solely for use by PE and potentially competitive games against other schools.”
Cllr Stewart Miller said: “I can remember playing hockey on that field many, many years ago and I don’t think it will have been upgraded ever since.
“I would suggest that this playing field really does need an update for Mearns Castle, one of the biggest schools we’ve got.
“I live very close to Williamwood High and I see the lights burning to 10pm. A lot of the neighbours have a lot of problems with the lights there.
“I think if they want it to 7pm, I’m happy to keep it until 7pm.”
A council report stated restricting the hours of use was “considered reasonable, in order to protect the amenity of nearby residents”.
The track and sports pitch will be able to open from 9am to 7pm from Monday to Friday and 9am to 1pm on Saturday.