Bryan Ruiz netted a 43rd minute decider in Recife, with Los Ticos - who were previously billed as Group D minnows - good value for the win as they were denied a legitimate penalty by Chilean referee Enrique Osses.
The Azzurri and Uruguay will on Tuesday battle it out to join the Central Americans in the next round, while the Three Lions head home with lowered heads. The last time the former champions bowed out of the tournament at the first hurdle was in 1958.
The contest at Arena Pernambuco was a cagey affair, largely short of goal-mouth activity. The action eventually heated up after 30 minutes, as Italy's Mario Balotelli squandered a one-on-one chance before drawing a fine save by Keilor Navas with a powerful volley from the edge of the area.
Costa Rica then should have been awarded a spot-kick in the 42nd minute when Giorgio Chiellini clattered Joel Campbell in the box, but Osses ruled in favour of the Italian.
La Sele, however, scored a minute later, as Ruiz nodded in a telling left-wing cross by Junior Diaz.
The Azzurri lacked creativity after the interval, although Navas was required to keep out a low drive by Matteo Darmian, a well as a dipping free-kick from Juventus veteran Andrea Pirlo just shy of the hour-mark.
Costa Rica, though, were relatively untroubled when defending their narrow lead in the closing stages.