Real Madrid are 45 minutes away from closing the gap on La Liga leaders Barcelona to two points after taking in a 1-0 lead against Almeria at half time.
Carlo Ancelotti's men were unable to breach a stubborn Almeria defence until a minute before half time when James Rodriguez struck to give the frustrated hosts the advantage at the break.
The European champions should have been ahead inside the first five minutes but James could only head over from Alvaro Arbeloa's cross.
Cristiano Ronaldo then had a couple of chances in quick succession when he headed over the bar moments after forcing a save with a shot at Almeria goalkeeper Ruben Martinez.
The visitors almost took a shock lead before the half-hour mark when Thomas Partey found Sebastian Dubarbier only for the latter to miss the target when well placed.
With the first half petering out, Colombian international James struck a volley to give the home side the lead.