They eat live, moving prey. Mealworms aren't a great staple as mentioned, but they will eat wriggling ones. You can also try earthworms as a great nutritious food source.

If you haven't seen it already, check out the care article Frog Forum - Gray Tree Frog Care and Breeding