Jonathan McDonald scored for the second game in a row for Oscar Ramirez's men before Pablo Antonio Gabas sealed the victory at Estadio Ricardo Saprissa Ayma.
It saw Alajuelense stay unbeaten through seven league games, four fewer than leaders UCR – who are four points ahead of them.
Alajuelense looked set to have to settle for a draw at Saprissa.
But McDonald delivered in the 78th minute, bringing down a long pass with his chest, letting it bounce before volleying into the roof of the net from inside the area.
Gabas ensured the visitors would take all three points with his strike two minutes before the end.
His 30-yard effort looked to be lacking the power and direction, but Saprissa goalkeeper Kevin Briceno could only parry the shot before watching it spin into his net.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.