Goldson and the 49ers had to come to an agreement on a multi-year deal before Monday's 1 p.m. deadline.
Goldson, who was given the franchise tag this summer, will now make $6.2 million this season. Goldson has said that he will play out the tender.
"If I have to play for the tag, I'll play for the tag," Goldson told SiriusXM NFL Radio. "But any guy would love long-term security. ...If not, I'll still be a 49er."
Golson reportedly turned down a five-year, $25 million offer last season from the Niners and ended up returning during training camp on a one-year deal worth $2 million. He then proceeded to produce a career-high six interceptions, second-most among NFL safeties.