The present invention concerns a topical pharmaceutical composition in form of thermoreversible gel comprising water, a topically active ingredient, a thickening matrix, based on one or more poloxamers, and hyaluronic acid. The composition of the invention, once applied to the gingival mucosa or to dental enamel, forms a gel having a slow release of the active ingredient incorporated therein.