Get the name of category in query

When you call

$categories = get_the_category($post->ID);

the $post variable is not defined yet (or is not the one that you expect), because you have to use it inside the loop.

Where you have

<span class="cate"><?php echo $categories ?></span>

replace with (this will output something like “Game, Arcade”)

<span class="cate"><?php the_category(', '); ?></span>

or if you want remove parent cat

<span class="cate">
<?php
$categories = get_the_category();
if( $categories ){
  $o = '';
  $sep = ', ';
  foreach($categories as $c) {
    if ( $c->parent == 0 ) continue;
    $o .= $c->cat_name . $sep;
  }
  echo rtrim($o, $sep);
}
?>
</span>