Saints manager Danny Lennon had resigned himself to losing the midfielder this summer, when his previous contract was due to expire.
But McGowan told Lennon last week he would like to negotiate a new deal, and the paperwork has now been completed.
The 25-year-old, who scored seven goals last season, is now signed up until next summer.
Grant Adam, meanwhile, has had his contract cancelled by mutual consent.
The goalkeeper joined from Airdrie last summer and spent the first half of this season on loan at his former club.
The 22-year-old leaves St Mirren without making a senior appearance.