This paper considers transmit covariance optimization for a multi-input multi-output (MIMO) Gaussian wiretap channel. Specifically, we aim to maximize the MIMO secrecy capacity by judiciously designing the transmit covariance under the sum power and per-antenna power constraints. The MIMO secrecy capacity maximization (SCM) problem is nonconvex, and so far there is no tractable solution available. We propose an alternating optimization (AO) approach to handle the SCM problem. In particular, our development consists of two steps: First, we show that the SCM problem can be reexpressed to a form that can be conveniently processed by AO. Second, we develop a custom-designed fast algorithm for each AO iteration. Interestingly, with this fast implementation, the overall AO algorithm can be viewed as performing iterative reweighting and water-filling. Finally, the convergence of the proposed algorithm to a stationary solution of SCM is shown, and numerical results are provided to demonstrate its efficacy.