Hi @RoopaPendyala,
Could you please share a bit more about your data source? Is it a SP list?
I created a SP list on my side, the data structure of it as below:
Note: The GroupName column and Parent Group column are both Single line of text type column in my SP list. The Parent Group column determine if a Group hierarchical has a parent group.
I have made a test on my side, please take a try with the following workaround:

Set the Items property of the Gallery1 (Parent Gallery) to following formula:
Filter('20180830_case7',Parent_x0020_Group=Blank())
Within the Gallery1, add a Label control, set Text property of it to following formula:
ThisItem.GroupName
Within the Gallery1, add another Gallery control (Gallery2, Child Gallery), set the Items property of the Gallery2 control to following formula:
Filter('20180830_case7',Parent_x0020_Group=ThisItem.GroupName)
Within Gallery2 control, add a Label control, set Text property of it to following formula:
ThisItem.GroupName
Note: The '20180830_case7' represents the SP list data source within my app.
The GIF screenshot as below:
Best regards,
Kris