Trains should be faster than cars in dense urban environments (if you are close to the station), e.g. London Euston to Watford 19miles 15-20mins by train 32mins by car (outside rush hour).
Although you do have to enter the station ~5 mins before the train leaves (allowing time to get through the ticket barrier, walk to the platform, board the train), plus exiting at the other end. My train gets into London Bridge in the morning at :32 but I don't get to the street until :36 because of the sheer volume of people. It seems minor, but it does all add up. That said, in rush hour there's no contest - that same journey would take 1 hour+.