I am also looking to add this same functionality to one of our web apps. I am surprised that a widget hasn't already been created and posted to Geonet that performs this task. I noticed that you can do this in the web mapping portion of AGOL, but you can't easily pull in that functionality to a web app. Anyone? If I knew how to create custom widgets, I would definitely work on this one.
There are a couple widgets that are available for shapes that you could take a look at. (I have not used them)
I copied this snippet from my /blogs/myAlaskaGIS/2016/03/09/web-appbuilder-developer-edition-customization-resource-list?sr=search... in case you want to see what else might be available.
I think the best thing will be to convert your GPX to shapefile and take benefit of the Addshapefile Widget or you had had to take advantage of the Geoprocessing Widget and create a geoprocessing task service or use this https://community.esri.com/thread/87050 as a reference
EDIT: Use can also explore this: https://github.com/WestonSF/ArcGISWebAppBuilderAddLocalDataWidget, which seems to do all that you desire but I haven't explored or tested it myself