Preventing bacterial infections on Ti-based medical products is crucial, driving the need for durable antibacterial surfaces with enhanced mechanical strength and photocatalytic activity. This study introduces an anodization process for fabricating a hard barrier-type TiO2 layer on a Ti substrate with visible-light-responsive photocatalytic activity. The core technology involves using an electrolyte comprising nitrate and ethylene glycol maintained at a high temperature to improve the layer hardness and photocatalytic performance. The layer characteristics, including thickness, crystallinity, and density, sensitively varied with increasing electrolyte temperature. For instance, raising the temperature to 100°C increased the layer thickness and density. By contrast, the thickness decreased beyond 100°C, leading to the deterioration of photocatalytic performance. Using ethylene glycol containing 100 mM nitrate maintained around 100°C was appropriate for maximizing layer hardness and photocatalytic performance. The resulting monolithic TiO2 layer exhibited a hardness of ~450 HV, approximately twice that of the Ti substrate. Moreover, it effectively reduced the number of living Escherichia coli to ~4/100 under ultraviolet (UV) light and ~4/10 under visible light after 4 h of illumination. These results provide a guideline for obtaining a semi-permanent antibacterial medium through anodization.