Shai Hope and Justin Greaves showcased resilience with unbeaten half-centuries, steering West Indies back into contention during the second Test against Sri Lanka in Antigua.