To try out the Gantt widget locally on your pc or even in a Mendix sandbox environment doesn’t require a license. However, a production build will.
It is also not required to have a license when the app is in production and the Gantt widget is not used on any pages.