Interesting question... It would be hard to really quantify something like this because it will be different for each person. Sure walking up a steep hill is always challenging, but some people are much better at it (but might struggle with steep downhill walks?).
Determining your Pace Index (how fast in MPH or KPH you walk), using your travel hiking time, is one approach you could take.
Try this equation:
Pace Index = (Distance) / (Travel Time + Elevation Factor)
For instance, if you are traveling 10 miles, and gaining zero elevation, and it takes 3.7 hours then your PI (Pace Index) would equal 2.7 (mph).
But if you added in 2000 feet of elevation gain and assume it takes you an extra hour per 1000 feet of gain then your pace index is now 1.75.
PI = (10 miles) / (3.7 hours + (2000 / 1000))
So the lower the PI the harder the hike.
Then you could assign each PI value to 1-10 difficulty value, so
PI of 5 = 1,
PI of 4 = 3,
PI of 3 = 5 etc...
This would be a way to factor in hike length and elevation. It wouldn't help with when the elevation happens or the MANY other factors you may encounter on a hike (quality of trail, weather, altitude, pack weight, etc...)
Since you have the .gpx data it would be really interesting to hear is someone has developed an algorithm that factors all those things in.