An effective and robust electrochemical approach has been developed for selective detection of dopamine in the presence of 3,4-dihydroxyphenylalanine (L-DOPA), ascorbic acid, uric acid and other dopamine metabolites. A 'layer-by-layer' film of tyramine and pyrrole-1-propionic acid (PPA) was formed by subsequent electropolymerization on a boron-doped diamond (BDD) electrode with an overall thickness of $33 nm as estimated by AFM. The formation of the electropolymerized homogeneous film was also confirmed by SEM and Raman spectroscopy. The modified BDD electrode exhibited rapid response to dopamine within 6 s and a detection limit of 50 nM with excellent reproducibility. The stable electropolymerized film was capable of excluding electroactive interference from 20 mM L-DOPA, 20 mM 3,4-dihydroxyphenylacetic acid (DOPAC), and ascorbic and uric acids at normal physiological conditions (100 mM each). The modified electrode could be used for several repeated analyses of dopamine at 5 mM, without noticeable surface fouling. A plausible mechanism for permselectivity was suggested and supported by pertinent experimental data.