Yes - he's drawn based on a specific kind of tank engine from the London, Brighton and South Coast Railway (E2 class). There's not a huge similarity with the engine in the photo except that they're both small and painted in a similar shade of blue.
Thomas's prototype causes problems for preserved railway lines in the UK, incidentally. 'Day Out With Thomas' events (where an engine 'dresses' as Thomas to run trains) are very popular, but there are actually zero preserved E2s, so they all look a bit wrong. If Rev Awdry had picked something more common (like a Jinty[0], say) to base Thomas on, there would be loads of nearly exact copies to go around...