Ryan Hunter-Reay passed Helio Castroneves at the start of the final lap to take a dramatic win in the 98th running of the Indianapolis 500.