There were many similarities, and many differences, between the MGM version of Hansel and Gretel and the Brothers Grimm version. In both stories, the children venture into the forest and find the witches house. In both stories, the witch feeds Hansel to fatten him up to eat him. And in both stories, Gretel is involved in the witches death and the two of them return home.
In the Hansel and Gretel fairytale, the children have a stepmother who decides to leave the children in the forest because the family is running low on food. In the MGM version, the children have a mother that gets upset with them for leaving food out for the donkey to eat, and sends them into the forest to find more food. In the Hansel and Gretel fairytale, the children find the witches house, and she locks Hansel up in a cage almost immediately. In the MGM version, the witch lets them into the home, is sweet to them for a while, sends them to bed, and is controlling them by magic. In the Hansel and Gretel fairytale, Gretel pushes the witch into the cauldron which kills her. In the MGM version, Gretel uses the witches magic against her to free Hansel, kill her, and escape.
These differences were probably because Disney was trying to make the story more children friendly. If the kids see that the mother simply sent them away as punishment, that may be more socially accepted than a stepmother getting rid of her children.