Mahalingam, who is also executive director, "will retire from his Executive and Board position on February 9, 2013, on reaching the retirement age of 65 years as per the company's policy," Tata Consultancy Services (TCS) said in a BSE filing.
Gopinathan will take over the position with effect from February 10, 2013.
The company had earlier announced the change at unveiling of its July-September 2012 earnings.
Mahalingam has had stints in TCS across sales, business, human resource and finance. His retirement is one of the high profile CFO changes that the Indian IT industry has witnessed.
Gopinathan, an MBA from IIM, Ahmedabad, has handled various finance functions over last several years and at present heads Business Finance and is responsible for financial management of the company's operating units.
Gopinathan, who has been with TCS since 2001, has also handled various roles across sales, strategy, business and finance.
Last year, Infosys's V Balakrishnan also gave up his position as the CFO after six years of being at the helm of finances of the IT major.
He is now responsible for three other key business divisions of the company -- BPO business, banking software product Finacle and the India Business Unit.