Harry Smith's drop goal with just two minutes left on the clock gave Wigan a dramatic 19-18 win over Hull FC.