The present invention provides a biocompatible coating comprising calcium phosphate that is functionally graded across the thickness of the coating. The coating, which preferably includes hydroxyapatite, is particularly useful for coating implants, such as dental or orthopedic implants. The functionally graded coating is generally crystalline near the interface with the surface of the implant, with crystallinity and crystal diameter decreasing toward the outer layer of the coating. The invention further provides methods for preparing a coated implant comprising a functionally graded calcium phosphate coating thereon. Furthermore, an antimicrobial agent can be dispersed within the calcium phosphate coating at discrete locations to provide for a coating with tailored release of the antimicrobial agent.