"gapps" is the Google apps package (though it's unusual to see it described that way in a stock ROM).
The phone claims to be running the stock android 5.01 ROM. The software information indicates a "World-Wide English" European phone.
However, there are some oddities:
* Though the software information says Android 5, "CW" (can't remember what that is) says "KK44", which is Kit-Kat, Android 4.4.
* The IMEI is unavailable. That's a serious red flag: something is badly wrong there.
And the worrying thing is that that "CW" information also says "Orange", because if there is mention of a service provider in the firmware it may well not allow you to flash anything other than that service provider's firmware (that, rather than a SIM lock, is the concern with service provider devices). The problem after all this time is that many of the sources you used to be able to download firmware from now longer exist, but Orange ROMs (in any of their national variants) were very rarely available.
So, what to do? Well I found one source for a stock HTC RUU matching the software version you have where the download link is still live:
RUU_M8_UL_L50_SENSE60_MR_HTC_Europe_4.16.401.10_Radio_1.25.214500021.06G_20.68.4196t.01_F_release_417003_signed.exe | by kalel77 for One M8. This will download the RUU as a Windows .exe file, so you need a Windows computer and a USB cable to use this. Connect the phone to the computer and run the RUU, it should give you instructions for anything else (you probably need USB debugging enabled. If you don't have a developer options menu, tap repeatedly on the "build number" in the software information until it tells you that you are a developer. Then go into developer options and enable usb debugging). If running that way doesn't work you could maybe try booting into fastboot mode (from the bootloader menu) and then running the RUU - I ever used these things from Windows so am not sure, but the first thing the RUU will do is boot your phone into fastboot so if it doesn't work when running Android maybe try that anyway and see if it can carry on from there? Otherwise there are tricks to extract the ROM zip from the RUU, copy it onto the phone (or an SD card) and then install that from recovery mode, but may as well try this first.
If the handset wants provider-specific software then it will refuse to install the ROM, probably with a message about the "CID" (Customer ID - where the customer is the service provider, not the end user). You don't have to worry about flashing the wrong RUU if the phone is S-On, it just won't do it (the problem being that this might stop you flashing perfectly compatible firmware just because it isn't signed by the service provider).
I can't think of anything else to try other than flashing a new stock firmware. But if that flashes and it doesn't work after that then it's probably a hardware fault, because the RUU will replace everything from bootloader onwards, so whatever a previous owner may have done to the software will be fixed.