You basically have two options:
Mark your question as a duplicate of the question containing Gert's answer that you like. However, you should only choose this strategy if your question is actually a duplicate. If that other question is about something completely different, and only coincidentally has an answer that solves your problem, your question is not a duplicate and should not be marked as one.
Take the essential bits from Gert's answer, remix as appropriate to create a fully-working solution that directly answers your question, and post your own answer to your question. It is perfectly valid to answer your own question—just be sure to give attribution to Gert for his original answer. A full name and a link would suffice.
If you go the second route, it is up to you whether you change the accepted answer to your own, or keep Steve's answer as the accepted answer. If you think your answer is really the best solution, then you should consider accepting it. Steve's answer will still be there, too, and you've already upvoted it, so he is still getting credit for the effort he put in to write it.
Whatever you do, do not add an answer to the body of your question. Questions and answers are kept completely separate on this site.
Independently of any of the above, if you really wish to thank someone for one of their contributions, you can always offer a bounty.