The Samsung's latest flagship, Galaxy S5 has gone into the development forum of XDA and has presented a root solution for the device. The development is only applicable for the International version with Qualcomm Snapdragon 801 SoC chipset, the device with Exynos chipset still have development and root access method to come.
The root method is so familiar with the previous devices methods. You'll need a CF-Auto-Root package which you'll flash through odin. The package file is available on XDA' s website.
Before applying the process, you must know that when the root access will be allowed the warranty will be void as the root binary counter will increase from 0 to 1. Also, the process may soft brick your device so you must do it on your own risk.
The below link will take you straight to the development forum of XDA.