The fourth seed, who was bidding for back-to-back grand slam triumphs, was beaten 5-7 6-4 7-5 5-7 6-3 in the fourth round clash on Hisense Arena, running out of steam for the deciding set which Cilic took with a single break.
With a little more composure, 19-year-old Gulbis, bidding to become the first Latvian to reach a Grand Slam semifinal, could have pulled off a famous win, but his 60 unforced errors and seven double faults told a sorry story.
The Swiss is bidding for his sixth Wimbledon triumph and a record 15th Grand Slam title, and there is little doubt who many of the fans will be supporting.