The 8,500–dwt Saint George (built 2008) collided with gate three at Brunsbuttel, mangling the metal.
A replacement gate will only be ready in May.
The vessel, operated by Pacific & Atlantic Shipmanager of Athens, was detained, German media reported.
An initial investigation found no problems with its systems.
The damage to the lock has been estimated at EUR 2.2m ($2.4m).
Police said the ship was en route from Amsterdam to Lubeck.