The Gathering skill affects your Total Gathering time. Every resource or object you can gather, has a "base forage time". This can be, for example for Medium Wood, 5 seconds. Every level of the gathering skill takes 1% off that time. For example, if you reach level 2 of the Gathering skill, the time to gather a medium wood is only 4.9 seconds! ( 0.98 * 5 = 4.9). All numbers are rounded to above. This means that level 1 actually has a gathering time of 4.95 seconds, but it will be rounded to 5 seconds. The same is if the gathering time is 4.91, it will still be 5 seconds.
The ammount of XP you get is calculated by multiplying the Players' gather time * 0.1. For example, an object that takes 10 seconds to forage gives you 0.1 * 10 = 1 XP.