Gokhale succeeds Dr Subrahmanyam Jaishankar, as the latter completed his tenure on January 28.
The 1981 batch officer of the Indian Foreign Service (IFS), Gokhale was the Indian ambassador to China from January 20, 2016, to October 21, 2017, and played a major role in resolving the 73-day-long Doklam Standoff between New Delhi and Beijing.
He will have two-year tenure as the foreign secretary.
Dr Jaishankar was appointed as foreign secretary on January 29, 2015. Last year, he was given a one-year extension in January.