You have several options to reach León from Bilbao on the day but I would have liked to know your arrival time to Bilbao because early afternoon is a bit vague and half an hour can make a difference... Anyway, the direct bus from Bilbao to León departs in the morning so it isn't an option to you. The direct train using the Iberian gauge railway departs in the morning too so it isn't an option for you either.
Some options that might suit you:
To take the slow direct narrow gauge (RENFE) FEVE train from Bilbao to León that crosses some nice areas but that takes 7h. 30m. to make the route. It departs from Bilbao at 14:30 and doesn't arrive to León till 22:00. Bring your own entertaiment and supplies if you feel you might need it/them along the route. For more info
www.renfe.com/EN/viajeros/feve/index.html (just in Spanish).
To make the route by bus changing buses in Burgos. You would need to take the 15:00 bus from Bilbao to Burgos in order to arrive to Burgos early enough as to take the last bus to León (departing from Burgos at 17:20 and arriving to León at 19:20).
To make the route by bus changing buses in Oviedo. You could depart from Bilbao at 1630 and arrive to León at 22:00 with 25 minutes to change buses in Oviedo.
To make the route by train changing trains in Valladolid means a detour but it's the option with the later departure from Bilbao. You could take the 17:08 train to Valladolid that would allow you to take the 21:15 train from Valladolid to León arriving to León at 23:07.
For bus info, take a look at the web of Alsa (
www.alsa.es/en). For train info, take a look at the web of RENFE (
www.renfe.com/EN/viajeros/index.html). In both cases make a separate search for each leg of the route.