An electrode for a biosensor (e.g., a glucose biosensor) has a layer of an electrically insulating polymer formed in situ on its operating surface by electropolymerization. For example, a diaminobenzene and a dihydroxybenzene (e.g., 1,3-diaminobenzene and resorcinol) are copolymerized on the electrode's surface by immersing the electrode in a circulating dilute solution of the monomers in deaerated phosphate buffer, and applying a small, continuously cycling voltage between that electrode and another electrode (e.g., from 0.00 V to 0.80 V) until current flow between the electrodes decreases to a minimum. Because the polymer is electrically insulating, polymerization ceases while the polymer layer is still very thin (e.g., 10 nm). An analyte sensing agent, e.g., an enzyme such as immobilized glucose oxidase, is imbedded in the polymer, but with a number of its analyte recognition sites unblocked. The polymer layer shields the electrode surface from interferrents and fouling agents such as uric acid and proteins, but it is sufficiently porous to permit smaller electroactive molecules (e.g., hydrogen peroxide) generated through contact of the enzyme with the analyte molecules to diffuse through to the electrode surface. Preferably a ferrocene compound (e.g., alpha-hydroxy-ethylferrocene or 1,1'-dimethylferrocene), which functions as an electron mediator, is applied to the polymer film, and held there by adsorption.