Smith turned around before Harbaugh in terms of play but began to win when Harbaugh gave the team the framework and mentality to win. Smith finished 2010, the year before Harbaugh, with 8 TDs and 1 INT, or since the We Want Carr chants, 10 TDs and 2 INTs. Smith said that moment taught him to stop caring about what the coach wanted (forcing things) and play football the right way. He took a philosophy of taking what the defense gave him and that was what he did in 2011. In 2012, he expanded that a little, but Kaepernick was well beyond that.
Kaepernick is better. Harbaugh is responsible for the majority of the Niners' success and a lot of Smith's success, but Smith did his part to get better and turn his career around. Kaepernick was just better than that in terms of threat, willingness to throw, velocity, and mobility (though Smith is mobile, too). If Kaepernick didn't have Harbaugh, he may be some project QB who is shelved forever under an inferior coach who doesn't know how to develop QBs or use their strengths.