The match was delayed for more than three hours by rain.
It is the 27th career title for the Briton, who also claimed the trophy in 2009 and `11, and his second of the season after winning at Miami in March.
Murray's victory came in his first tournament since he was forced to withdraw from the French Open with a back injury.
"I worked very hard in the time that I had off to try and get myself in the best shape possible," Murray said.
Murray yelled in agony in the match's eighth game after straining his groin in a stretch but kept playing without treatment.
Murray dominated the final set, going up 3-1 when Cilic made a forehand error.