Does altering Gear Ratio improve efficiency (loss of energy as heat while converting EE to ME) of a machine? I also read online that having higher gear contact ratio improves the efficiency, but I really don't understand how.
Not basically. Gear ratios change "mechanical advantage". Think of a bicycle. In low gear you can climb a modest hill more easily (less force on the pedals) but you have to make more pedal revolutions to climb the hill, whereas in high gear to climb the same hill you have to pedal with more force on the pedals, but then you don't have to pedal as many pedal revolutions.
Expended energy to climb the hill = 2π x (pedal force) x (number of revolutions) x (pedal lever arm). Lever arm is constant. So the expended energy is the same in low and high gear.