The worst or most despicable example of something.
There's not a great deal to be said about this little expression. It is American and originated in the 1950s. Around the same time, and logic dictates that this came earlier, Americans began using 'pits' as shorthand slang for armpits. 'The pits', with its suggestion of bad odour, was synonymous with 'the armpits'. The first example that I can find of 'the pits' being used as slang with that meaning is from Newsweek, November 1953:
A bad exam experience would be ‘I'm wasted’ at Howard,..‘It was the pits’ at Vassar.