We propose a modified version of the classical gradient descent method to compute the capacity of finite-state channels with Markovian input. Under some concavity assumption, our algorithm proves to achieve a polynomial accuracy in a polynomial time for general finite-state channels. Moreover, for some special families of finite-state channels, our algorithm can achieve an exponential accuracy in a polynomial time.