Is "I am more than happy to help you" grammatically correct?

Yes it is. The comparison here is not that your teacher is happier than others to help you, but that they are happier than "happy".

If we list a number of words that relate to happiness/sadness in order from sadness (a low "happiness" score) upwards, we might get something like this:

  • inconsolable
  • miserable
  • sad
  • okay
  • glad
  • happy
  • overjoyed
  • ecstatic

By saying "I am more than happy" your teacher means their level of happiness is above "happy" on that scale. Perhaps a more precise way of saying it would be "I am happier than happy to help you", but "more than happy" is a very well established and frequently used turn of phrase.