With express passenger steam, rather surprisingly, Bulleid Pacifics provided the rails were dry. Came from having three short-stroke cylinders and small driving wheels (which is generally what affects acceleration). A 3-cylinder O2 could probably out-drag an 8F as well. With all steam, the
Holden Decapod, which was designed specifically to out-accelerate EMUs probably holds the British record.
With modern traction <EDIT> on the southern end of the ECML </EDIT>, HSTs comfortably beat most loco-hauled stock out of King's Cross because they are light and powerful. Deltics were often slower than the Cravens units, mostly because of their high gearing. Indeed, 313s used to race Deltics and win between Hatfield and Welwyn. Today, a 365 or a Eurostar would blow anything away, a 317 and an HST are about the same, with a 90 or 89 fairly close. 91s are the slowest to Finsbury Park, but the quickest up Stoke (again, because of high gearing).