Arkansas trailed 6-4 entering the ninth before Andrew Benintendi led off with his league-leading 18th homer of the season to pull the Razorbacks within one.
One out later, Rick Nomura walked and then Wernes hit a homer over the left field fence that pushed Arkansas ahead 7-6. Zach Jackson pitched a scoreless ninth for the Razorbacks to earn his sixth save.
Florida's J.J. Schwarz finished with three hits, including two doubles, and drove in three runs.
The game lasted nearly four hours and didn't end until about 1:30 a.m. local time.