Steve Smith scored a Test century after a gap of 25 innings, the longest ever drought in his career, on the second day of the third Test between India and Australia at the Gabba in Brisbane.