We present an implicit finite element method for a class of chemotaxis models in three spatial dimensions. The proposed algorithm is designed to maintain mass conservation and to guarantee positivity of the cell density. To enforce the discrete maximum principle, the standard Galerkin discretization is constrained using a local extremum diminishing flux limiter. To demonstrate the efficiency and robustness of this approach, we solve blow-up problems in a 3D chemostat domain. To give a flavor of more complex and realistic chemotactic applications, we investigate the pattern dynamics and aggregating behavior of the bacteria Escherichia coli and Salmonella typhimurium. The obtained numerical results are in good qualitative agreement with theoretical studies and experimental data reported in the literature.