Locking device for gates or the like, comprising a movable element, which is cinematically connected to a gate or the like in order to operate the closing and the opening thereof, and a locking body configured to reversibly lock said movable element, said movable element comprising at least one locking seat and being able to move along a movement direction, said locking body comprising at least one locking tooth, which is configured to engage said locking seat of said movable element, said locking body being movable between a locking position of said movable element and a position of complete unlocking of said movable element, in said position of complete unlocking, said locking body being completely extracted from said locking seat, said locking device further comprising an actuator which is movable along an acting direction, the movement of said actuator along said acting direction implying the progressive inclination (α) of at least one arm with respect to a direction orthogonal to said acting direction, said locking seat being defined by a toothing which comprises a plurality of teeth, said locking tooth has at least one face which is configured to abut against at least one corresponding face of one of said teeth of said toothing, characterised in that said actuator and said locking body being cinematically connected to one another by means of said at least one arm, hinged at its own ends to said locking body and to said actuator, respectively, said face of said locking tooth and said face of one of said teeth of said toothing having at least an angle of inclination (β) with respect to a direction orthogonal to said movement direction of said movable element, such that the value of the tangent of said angle of inclination (β) is higher than the friction coefficient (μ) existing between said face of said locking tooth and said face of one of said teeth of said toothing, the movement of said movable element along said movement direction being prevented by said locking body as long as said inclination (α) of said arm is lower than an unlocking inclination (γ) starting from which a thrust exerted by said locking seat of said movable element against said locking tooth of said locking body is sufficient to push said locking tooth out of said locking seat, in said position of complete unlocking, and to allow the movement of said movable element along said movement direction. said movable element comprising at least one locking seat and being able to move along a movement direction, said locking body comprising at least one locking tooth, which is configured to engage said locking seat of said movable element, said locking body being movable between a locking position of said movable element and a position of complete unlocking of said movable element, in said position of complete unlocking, said locking body being completely extracted from said locking seat, said locking device further comprising an actuator which is movable along an acting direction, the movement of said actuator along said acting direction implying the progressive inclination (α) of at least one arm with respect to a direction orthogonal to said acting direction, said locking seat being defined by a toothing which comprises a plurality of teeth, said locking tooth has at least one face which is configured to abut against at least one corresponding face of one of said teeth of said toothing, characterised in that said actuator and said locking body being cinematically connected to one another by means of said at least one arm, hinged at its own ends to said locking body and to said actuator, respectively, said face of said locking tooth and said face of one of said teeth of said toothing having at least an angle of inclination (β) with respect to a direction orthogonal to said movement direction of said movable element, such that the value of the tangent of said angle of inclination (β) is higher than the friction coefficient (μ) existing between said face of said locking tooth and said face of one of said teeth of said toothing, the movement of said movable element along said movement direction being prevented by said locking body as long as said inclination (α) of said arm is lower than an unlocking inclination (γ) starting from which a thrust exerted by said locking seat of said movable element against said locking tooth of said locking body is sufficient to push said locking tooth out of said locking seat, in said position of complete unlocking, and to allow the movement of said movable element along said movement direction.