to treat sb with great respect in order to gain favour with them
pay court to sb
Definitions from the Oxford Advanced Learner's Dictionary, 9th edition