WARNING: This page is about a different car, the 2016 Hyundai Genesis and 2015 Hyundai Genesis. However, it is still accessible from the selected car via links, so may be relevant.
Check for continuity between the tailgate latch terminals.
Fig 1: Tailgate Latch Connector Terminals
Courtesy of HYUNDAI MOTOR AMERICA
If continuity is not specified, inspect the switch