Response Time is defined as the total time spent by a client waiting for a result after invoking some server function.
Latency is defined as the time spent by a message to reach a destination from its sender.
Difference between Response Time and Latency
Essentially you can think of Latency as the time it takes your message to make a one-way trip, and Response Time as the time it takes your message to make a return trip.
How do I know this?
In 2015 I wrote an Honours Thesis entitled "Web Application Performance Testing". I took these definitions from this article that I referenced in my literature review:
Chen, Shiping et al. (2008). “Yet Another Performance Testing Framework”. In: Software Engineering, 2008. ASWEC 2008. 19th Australian Conference on. IEEE, pp. 170–179.