For anyone who is looking for a solution to this problem in GitBook. This is how I made it work (in GitBook). You need to tag your header explicitly, like this:
# My Anchored Heading {#my-anchor}
Then link to this anchor like this
[link to my anchored heading](#my-anchor)
Solution, and additional examples, may be found here: https://seadude.gitbooks.io/learn-gitbook/