Hi Ciana,
I looked all over at hymns written around the time the Heidi was published (the late 1800s), and can't find any English-language hymn with these exact words--all the references I find are, of course, to the same English translation of Heidi you're referencing.
I actually looked in the original German-language version of Heidi by Johanna Spyri and found the part of the book where the hymn was listed:
Gott will's machen, Daß die Sachen Gehen, wie es heilsam ist. Laß die Wellen Immer schwellen, Denk, wie du so sicher bist!
A little more digging, and I found this German-language hymn by Johann Daniel Herrnschidt:
Gott will's machen, dass die Sachen
1) Gott will's machen, dass die Sachen gehen, wie es heilsam ist;
dass die Wellen höher schwellen, wenn du nur bei Jesus bist.
2) Wer sich kränket, weil er denket, Jesus liege in dem Schlaf,
wird mit Klagen nur sich plagen, dass der Unglaub leide Straf.
3) Glaub nur feste, dass das Beste über dich beschlossen sei;
wenn dein Wille nur ist stille, wirst du von dem Kummer frei.
4) Gottes Hände sind ohn Ende, sein Vermögen hat kein Ziel.
Ist's beschwerlich, scheint's gefährlich, deinem Gott ist nichts zu viel.
5) Wenn die Stunden sich gefunden, bricht die Hilf mit Macht herein;
und dein Grämen zu beschämen, wird es unversehens sein.
6) Amen, Amen! In dem Namen meines Jesu halt ich still;
es geschehe und ergehe, wie und wann und was er will!
Here's a version on YouTube:
http://www.youtube.com/watch?v=TuKdOnsDCyk
Perhaps some of our German-speaking readers can provide some more history or insight behind the hymn.
Unfortunately, it doesn't look like this hymn was widely translated into English, and if it was it certainly didn't use the same words that the translator of Heidi used (it doesn't seem to necessarily be a direct translation).
Having said that, hopefully this provides a little insight and can help you picture the hymn that Heidi and her grandmother shared
God bless!
Steve