ゴマをする (goma wo suru) literally means “grind sesame seeds”, but figuratively means “be a sycophant” or “butter up/suck up (to someone)”. This idiom is so famous that the gesture of grinding seeds (rotating a closed hand on the palm of the other hand) refers to the act of sucking up to someone. According to one of the theories of the origin, the phrase originates from the fact that ground sesame seeds are very sticky and stick to anything, which resembles sycophants/brown-nosers tagging along with high-ranking people.
〜にゴマをする: butter up ~/act obsequiously towards ~
彼は昇進 (しょうしん) するためなら、進（すす）んでゴマをする人間（にんげん）だ
He is a person who is willing to act obsequiously to get promoted.