What is the function of 甲 in 桂林山水甲天下?
甲is the first stem of Celestial or Heavenly Stems. We use 甲 as 第一(NO.1) or 顶级(top). Hence, 桂林山水甲天下 means 桂林山水天下第一。

甲天下 means best in the world or No.1 in the world

Anohter example, Lega Serie A is the top football league in Italy, which is translated as 意大利甲级联赛。