During the Beanstalk level, you will be sliding on a leaf and at various points, flying on a flower. There are two sections in which you need to achieve a perfect time. Lean side to side to collect coins and dodge flowers. To move faster, lean foward to boost. Boosting the entire time for the first portion is fine, but when you reach the second part, (After the cut scene with you and humpty.) I would advise you to boost only part of the time. It will be much harder to dodge flowers at full speed.
Gold Medal requires you to achieve a score of 75,000 or more. When going for the perfect time, you will most likely net this one as well.